diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/cast.json')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/cast.json | 3040 |
1 files changed, 3040 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/cast.json b/testing/web-platform/tests/webnn/resources/test_data/cast.json new file mode 100644 index 0000000000..59d1036eee --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/cast.json @@ -0,0 +1,3040 @@ +{ + "tests": [ + { + "name": "cast float32 0D tensor to int32", + "inputs": { + "input": { + "shape": [], + "data": [ + 84.77753448486328 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [], + "data": [ + 84 + ], + "type": "int32" + } + }, + { + "name": "cast float32 1D tensor to int32", + "inputs": { + "input": { + "shape": [24], + "data": [ + 102.1578369140625, + -43.5, + 52.84621810913086, + -99.9583511352539, + 6.729493141174316, + 92.66157531738281, + -10.377813339233398, + 106.65289306640625, + -7.126272678375244, + 91.51563262939453, + -50.87134552001953, + 83.38890075683594, + 72.9759750366211, + -31.015382766723633, + 79.94034576416016, + 41.5, + 35.727149963378906, + -2.5, + -96.05252838134766, + -86.76212310791016, + -27.49382972717285, + -23.836687088012695, + 70.77123260498047, + 83.5 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [24], + "data": [ + 102, + -43, + 52, + -99, + 6, + 92, + -10, + 106, + -7, + 91, + -50, + 83, + 72, + -31, + 79, + 41, + 35, + -2, + -96, + -86, + -27, + -23, + 70, + 83 + ], + "type": "int32" + } + }, + { + "name": "cast float32 2D tensor to int32", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 102.1578369140625, + -43.5, + 52.84621810913086, + -99.9583511352539, + 6.729493141174316, + 92.66157531738281, + -10.377813339233398, + 106.65289306640625, + -7.126272678375244, + 91.51563262939453, + -50.87134552001953, + 83.38890075683594, + 72.9759750366211, + -31.015382766723633, + 79.94034576416016, + 41.5, + 35.727149963378906, + -2.5, + -96.05252838134766, + -86.76212310791016, + -27.49382972717285, + -23.836687088012695, + 70.77123260498047, + 83.5 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 102, + -43, + 52, + -99, + 6, + 92, + -10, + 106, + -7, + 91, + -50, + 83, + 72, + -31, + 79, + 41, + 35, + -2, + -96, + -86, + -27, + -23, + 70, + 83 + ], + "type": "int32" + } + }, + { + "name": "cast float32 3D tensor to int32", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 102.1578369140625, + -43.5, + 52.84621810913086, + -99.9583511352539, + 6.729493141174316, + 92.66157531738281, + -10.377813339233398, + 106.65289306640625, + -7.126272678375244, + 91.51563262939453, + -50.87134552001953, + 83.38890075683594, + 72.9759750366211, + -31.015382766723633, + 79.94034576416016, + 41.5, + 35.727149963378906, + -2.5, + -96.05252838134766, + -86.76212310791016, + -27.49382972717285, + -23.836687088012695, + 70.77123260498047, + 83.5 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 102, + -43, + 52, + -99, + 6, + 92, + -10, + 106, + -7, + 91, + -50, + 83, + 72, + -31, + 79, + 41, + 35, + -2, + -96, + -86, + -27, + -23, + 70, + 83 + ], + "type": "int32" + } + }, + { + "name": "cast float32 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + -43.5, + 52.84621810913086, + -99.9583511352539, + 6.729493141174316, + 92.66157531738281, + -10.377813339233398, + 106.65289306640625, + -7.126272678375244, + 91.51563262939453, + -50.87134552001953, + 83.38890075683594, + 72.9759750366211, + -31.015382766723633, + 79.94034576416016, + 41.5, + 35.727149963378906, + -2.5, + -96.05252838134766, + -86.76212310791016, + -27.49382972717285, + -23.836687088012695, + 70.77123260498047, + 83.5 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 102, + -43, + 52, + -99, + 6, + 92, + -10, + 106, + -7, + 91, + -50, + 83, + 72, + -31, + 79, + 41, + 35, + -2, + -96, + -86, + -27, + -23, + 70, + 83 + ], + "type": "int32" + } + }, + { + "name": "cast float32 5D tensor to int32", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 102.1578369140625, + -43.5, + 52.84621810913086, + -99.9583511352539, + 6.729493141174316, + 92.66157531738281, + -10.377813339233398, + 106.65289306640625, + -7.126272678375244, + 91.51563262939453, + -50.87134552001953, + 83.38890075683594, + 72.9759750366211, + -31.015382766723633, + 79.94034576416016, + 41.5, + 35.727149963378906, + -2.5, + -96.05252838134766, + -86.76212310791016, + -27.49382972717285, + -23.836687088012695, + 70.77123260498047, + 83.5 + ], + "type": "float32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 102, + -43, + 52, + -99, + 6, + 92, + -10, + 106, + -7, + 91, + -50, + 83, + 72, + -31, + 79, + 41, + 35, + -2, + -96, + -86, + -27, + -23, + 70, + 83 + ], + "type": "int32" + } + }, + { + "name": "cast float32 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + 43.60371780395508, + 52.84621810913086, + 99.9583511352539, + 6.729493141174316, + 92.66157531738281, + 10.377813339233398, + 106.65289306640625, + 7.126272678375244, + 91.51563262939453, + 50.87134552001953, + 83.38890075683594, + 72.9759750366211, + 31.015382766723633, + 79.94034576416016, + 41.844703674316406, + 35.727149963378906, + 2.614182949066162, + 96.05252838134766, + 86.76212310791016, + 27.49382972717285, + 23.836687088012695, + 70.77123260498047, + 83.8347396850586 + ], + "type": "float32" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 102.1875, + 43.59375, + 52.84375, + 99.9375, + 6.73046875, + 92.6875, + 10.375, + 106.625, + 7.125, + 91.5, + 50.875, + 83.375, + 73, + 31.015625, + 79.9375, + 41.84375, + 35.71875, + 2.61328125, + 96.0625, + 86.75, + 27.5, + 23.84375, + 70.75, + 83.8125 + ], + "type": "float16" + } + }, + { + "name": "cast float32 4D tensor to uint32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + 43.60371780395508, + 52.84621810913086, + 99.9583511352539, + 6.729493141174316, + 92.66157531738281, + 10.377813339233398, + 106.65289306640625, + 7.126272678375244, + 91.51563262939453, + 50.87134552001953, + 83.38890075683594, + 72.9759750366211, + 31.015382766723633, + 79.94034576416016, + 41.844703674316406, + 35.727149963378906, + 2.614182949066162, + 96.05252838134766, + 86.76212310791016, + 27.49382972717285, + 23.836687088012695, + 70.77123260498047, + 83.8347396850586 + ], + "type": "float32" + } + }, + "type": "uint32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 102, + 43, + 52, + 99, + 6, + 92, + 10, + 106, + 7, + 91, + 50, + 83, + 72, + 31, + 79, + 41, + 35, + 2, + 96, + 86, + 27, + 23, + 70, + 83 + ], + "type": "uint32" + } + }, + { + "name": "cast float32 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + 43.60371780395508, + 52.84621810913086, + 99.9583511352539, + 6.729493141174316, + 92.66157531738281, + 10.377813339233398, + 106.65289306640625, + 7.126272678375244, + 91.51563262939453, + 50.87134552001953, + 83.38890075683594, + 72.9759750366211, + 31.015382766723633, + 79.94034576416016, + 41.844703674316406, + 35.727149963378906, + 2.614182949066162, + 96.05252838134766, + 86.76212310791016, + 27.49382972717285, + 23.836687088012695, + 70.77123260498047, + 83.8347396850586 + ], + "type": "float32" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "102", + "43", + "52", + "99", + "6", + "92", + "10", + "106", + "7", + "91", + "50", + "83", + "72", + "31", + "79", + "41", + "35", + "2", + "96", + "86", + "27", + "23", + "70", + "83" + ], + "type": "int64" + } + }, + { + "name": "cast float32 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + 43.60371780395508, + 52.84621810913086, + 99.9583511352539, + 6.729493141174316, + 92.66157531738281, + 10.377813339233398, + 106.65289306640625, + 7.126272678375244, + 91.51563262939453, + 50.87134552001953, + 83.38890075683594, + 72.9759750366211, + 31.015382766723633, + 79.94034576416016, + 41.844703674316406, + 35.727149963378906, + 2.614182949066162, + 96.05252838134766, + 86.76212310791016, + 27.49382972717285, + 23.836687088012695, + 70.77123260498047, + 83.8347396850586 + ], + "type": "float32" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 102, + 43, + 52, + 99, + 6, + 92, + 10, + 106, + 7, + 91, + 50, + 83, + 72, + 31, + 79, + 41, + 35, + 2, + 96, + 86, + 27, + 23, + 70, + 83 + ], + "type": "int8" + } + }, + { + "name": "cast float32 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 102.1578369140625, + 43.60371780395508, + 52.84621810913086, + 99.9583511352539, + 6.729493141174316, + 92.66157531738281, + 10.377813339233398, + 106.65289306640625, + 7.126272678375244, + 91.51563262939453, + 50.87134552001953, + 83.38890075683594, + 72.9759750366211, + 31.015382766723633, + 79.94034576416016, + 41.844703674316406, + 35.727149963378906, + 2.614182949066162, + 96.05252838134766, + 86.76212310791016, + 27.49382972717285, + 23.836687088012695, + 70.77123260498047, + 83.8347396850586 + ], + "type": "float32" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 102, + 43, + 52, + 99, + 6, + 92, + 10, + 106, + 7, + 91, + 50, + 83, + 72, + 31, + 79, + 41, + 35, + 2, + 96, + 86, + 27, + 23, + 70, + 83 + ], + "type": "uint8" + } + }, + { + "name": "cast float16 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float32" + } + }, + { + "name": "cast float16 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 3, + 32, + 62, + 51, + 87, + 106, + 125, + 112, + 70, + 39, + 10, + 21, + 99, + 16, + 115, + 66, + 49, + 115, + 77, + 57, + 61, + 12, + 101, + 123 + ], + "type": "int32" + } + }, + { + "name": "cast float16 4D tensor to uint32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "uint32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 3, + 32, + 62, + 51, + 87, + 106, + 125, + 112, + 70, + 39, + 10, + 21, + 99, + 16, + 115, + 66, + 49, + 115, + 77, + 57, + 61, + 12, + 101, + 123 + ], + "type": "uint32" + } + }, + { + "name": "cast float16 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "3", + "32", + "62", + "51", + "87", + "106", + "125", + "112", + "70", + "39", + "10", + "21", + "99", + "16", + "115", + "66", + "49", + "115", + "77", + "57", + "61", + "12", + "101", + "123" + ], + "type": "int64" + } + }, + { + "name": "cast float16 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 3, + 32, + 62, + 51, + 87, + 106, + 125, + 112, + 70, + 39, + 10, + 21, + 99, + 16, + 115, + 66, + 49, + 115, + 77, + 57, + 61, + 12, + 101, + 123 + ], + "type": "int8" + } + }, + { + "name": "cast float16 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 3.103515625, + 32.40625, + 62.15625, + 51.75, + 87.0625, + 106.25, + 125.375, + 112.9375, + 70.8125, + 39.1875, + 10.3515625, + 21.234375, + 99.75, + 16.125, + 115.625, + 66, + 49.375, + 115.75, + 77, + 57.15625, + 61.6875, + 12.9296875, + 101.25, + 123.9375 + ], + "type": "float16" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 3, + 32, + 62, + 51, + 87, + 106, + 125, + 112, + 70, + 39, + 10, + 21, + 99, + 16, + 115, + 66, + 49, + 115, + 77, + 57, + 61, + 12, + 101, + 123 + ], + "type": "uint8" + } + }, + { + "name": "cast int32 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int32" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "float32" + } + }, + { + "name": "cast int32 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int32" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "float16" + } + }, + { + "name": "cast int32 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int32" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "45", + "55", + "11", + "21", + "78", + "104", + "102", + "66", + "41", + "110", + "92", + "69", + "48", + "23", + "58", + "12", + "33", + "24", + "101", + "87", + "49", + "118", + "1", + "77" + ], + "type": "int64" + } + }, + { + "name": "cast int32 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int32" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int8" + } + }, + { + "name": "cast int32 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "int32" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 45, + 55, + 11, + 21, + 78, + 104, + 102, + 66, + 41, + 110, + 92, + 69, + 48, + 23, + 58, + 12, + 33, + 24, + 101, + 87, + 49, + 118, + 1, + 77 + ], + "type": "uint8" + } + }, + { + "name": "cast uint32 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "float32" + } + }, + { + "name": "cast uint32 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "float16" + } + }, + { + "name": "cast uint32 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "int32" + } + }, + { + "name": "cast uint32 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "34", + "83", + "113", + "31", + "62", + "80", + "8", + "40", + "104", + "42", + "6", + "91", + "93", + "21", + "40", + "21", + "51", + "110", + "115", + "12", + "122", + "68", + "57", + "72" + ], + "type": "int64" + } + }, + { + "name": "cast uint32 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "int8" + } + }, + { + "name": "cast uint32 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint32" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 34, + 83, + 113, + 31, + 62, + 80, + 8, + 40, + 104, + 42, + 6, + 91, + 93, + 21, + 40, + 21, + 51, + 110, + 115, + 12, + 122, + 68, + 57, + 72 + ], + "type": "uint8" + } + }, + { + "name": "cast int64 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "float32" + } + }, + { + "name": "cast int64 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "float16" + } + }, + { + "name": "cast int64 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "int32" + } + }, + { + "name": "cast int64 4D tensor to uint32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "uint32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "uint32" + } + }, + { + "name": "cast int64 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "int8" + } + }, + { + "name": "cast int64 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + "50", + "1", + "28", + "20", + "102", + "86", + "70", + "38", + "50", + "19", + "11", + "4", + "56", + "77", + "40", + "80", + "45", + "127", + "4", + "87", + "125", + "26", + "63", + "11" + ], + "type": "int64" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 50, + 1, + 28, + 20, + 102, + 86, + 70, + 38, + 50, + 19, + 11, + 4, + 56, + 77, + 40, + 80, + 45, + 127, + 4, + 87, + 125, + 26, + 63, + 11 + ], + "type": "uint8" + } + }, + { + "name": "cast int8 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "float32" + } + }, + { + "name": "cast int8 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "float16" + } + }, + { + "name": "cast int8 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int32" + } + }, + { + "name": "cast int8 4D tensor to uint32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "uint32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "uint32" + } + }, + { + "name": "cast int8 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "123", + "17", + "31", + "77", + "88", + "44", + "84", + "40", + "14", + "64", + "109", + "4", + "2", + "0", + "45", + "47", + "72", + "88", + "82", + "4", + "73", + "36", + "65", + "117" + ], + "type": "int64" + } + }, + { + "name": "cast int8 4D tensor to uint8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "int8" + } + }, + "type": "uint8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 123, + 17, + 31, + 77, + 88, + 44, + 84, + 40, + 14, + 64, + 109, + 4, + 2, + 0, + 45, + 47, + 72, + 88, + 82, + 4, + 73, + 36, + 65, + 117 + ], + "type": "uint8" + } + }, + { + "name": "cast uint8 4D tensor to float32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "float32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "float32" + } + }, + { + "name": "cast uint8 4D tensor to float16", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "float16", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "float16" + } + }, + { + "name": "cast uint8 4D tensor to int32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "int32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "int32" + } + }, + { + "name": "cast uint8 4D tensor to uint32", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "uint32", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint32" + } + }, + { + "name": "cast uint8 4D tensor to int64", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "int64", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + "10", + "112", + "121", + "120", + "22", + "105", + "41", + "30", + "75", + "121", + "55", + "47", + "121", + "24", + "16", + "33", + "97", + "24", + "3", + "37", + "45", + "6", + "56", + "57" + ], + "type": "int64" + } + }, + { + "name": "cast uint8 4D tensor to int8", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "uint8" + } + }, + "type": "int8", + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 10, + 112, + 121, + 120, + 22, + 105, + 41, + 30, + 75, + 121, + 55, + 47, + 121, + 24, + 16, + 33, + 97, + 24, + 3, + 37, + 45, + 6, + 56, + 57 + ], + "type": "int8" + } + } + ] +}
\ No newline at end of file |