Download build/webgpu/test.json from webgpu-kernels/ai.onnx.Expand: direct link, hf CLI and curl.
- Browser
- Download file 29.8 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Expand/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.Expand@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Expand/resolve/v1/build/webgpu/test.json
29.8 kB
| { | |
| "cases": [ | |
| { | |
| "name": "repeat_second_axis_with_contiguous_inner_block", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 3, 8], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.37, "cosStep": 0.19 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 3, 3, 8] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3, 8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int16_broadcast_boundaries", | |
| "inputs": { | |
| "input": { "dtype": "int16", "shape": [1, 4], "data": { "kind": "values", "values": [-32768, -1, 0, 32767] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "int16", | |
| "shape": [2, 4], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [-32768, -1, 0, 32767, -32768, -1, 0, 32767] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "dispatch_cliff_scalar_splat", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [7.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [16776963] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [16776963], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "scalar_to_3x3", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.5] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_float_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "row_vector_to_3x3", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1, 3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_float_vector_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "col_vector_to_3x3", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_float_col_vector_to_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank3_broadcast", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [1, 3, 1], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 4], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "uint32_bool_like_broadcast", | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [1, 3, 1], "data": { "kind": "values", "values": [1, 0, 2] } }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [2, 3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank5_broadcast", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 2, 1, 1], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [2, 3, 2, 4, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 2, 4, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank7_broadcast", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 1, 3, 1, 1, 2], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "true_scalar_to_rank3", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-2.5] } }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 2, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "scalar_to_scalar_empty_shape", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [6.5] } }, | |
| "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "broadcast_to_zero_width_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1", | |
| "notes": "Valid empty-output broadcast: input shape [1,0] expands to [3,0]. No elements are written, but generated stride math must still compile." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1, 0], "data": { "kind": "values", "values": [] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 0] } } | |
| }, | |
| "outputs": { | |
| "output": { "dtype": "float32", "shape": [3, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } } | |
| } | |
| }, | |
| { | |
| "name": "broadcast_to_zero_middle_dim_scalar", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1x3x1_int64", | |
| "notes": "A zero-sized broadcast output with an unaligned final dimension exercises zero strides in the scalar Expand path." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [1, 0, 5], "data": { "kind": "values", "values": [] } }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 0, 5] } } | |
| }, | |
| "outputs": { | |
| "output": { "dtype": "float32", "shape": [3, 0, 5], "tolerance": 0, "data": { "kind": "values", "values": [] } } | |
| } | |
| }, | |
| { | |
| "name": "ort_int32_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3_int32" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [1] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_int32_vector_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_int32" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_int32_rank4_singletons", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1x3x1_int64", | |
| "notes": "Same rank-4 singleton broadcast pattern adapted to int32 storage." | |
| }, | |
| "inputs": { | |
| "input": { | |
| "dtype": "int32", | |
| "shape": [1, 3, 1, 3], | |
| "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [3, 3, 3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [3, 3, 3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_f16_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3_float16" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": [1.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "ort_f16_vector_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_float16" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float16", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "ort_f16_col_vector_to_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3_float16" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float16", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3, 3], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "ort_uint32_bool_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3_bool", | |
| "notes": "Projects boolean source values to logical booleans stored in uint32 slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [1] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint32_bool_col_to_four_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x4_bool", | |
| "notes": "Projects boolean source values to logical booleans stored in uint32 slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_shape_dim_one_does_not_shrink_rank5", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_2x2x1x2x1_float" | |
| }, | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [2, 2, 1, 2, 1], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [1, 2, 2, 2, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2, 2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_shape_dim_one_does_not_shrink_middle", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1x8_float" | |
| }, | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [3, 2, 1], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 1, 8] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 2, 8], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_int32_col_vector_to_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3_int32" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "int32", "shape": [3, 1], "data": { "kind": "values", "values": [1, 2, 3] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint32_bool_col_to_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3_bool", | |
| "notes": "Projects boolean source values to logical booleans stored in uint32 slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint32_bool_row_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_4x1_bool", | |
| "notes": "Projects boolean source values to logical booleans stored in uint32 slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [4, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_scalar_float_empty_shape", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_scalar_float" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "onnx_backend_expand_dim_changed", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 1, 6] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 6] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_changed", | |
| "notes": "The integer shape tensor exactly represents the source ONNX int64 expansion dimensions." | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_expand_dim_unchanged", | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3, 4] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_expand_dim_unchanged", | |
| "notes": "The integer shape tensor exactly represents the source ONNX int64 expansion dimensions." | |
| } | |
| }, | |
| { | |
| "name": "ort_scalar_float_to_scalar", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_scalar_float", | |
| "notes": "Projects the empty int64 shape tensor to the package's uint32 metadata slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } }, | |
| "shape": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_scalar_int32_to_rank3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_scalar_int32", | |
| "notes": "Projects representable int64 shape values to the package's uint32 metadata slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [9] } }, | |
| "shape": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_bool_pattern_uint32_row_expand", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_bool", | |
| "notes": "Projects boolean payload values to logical booleans stored in uint32 slots." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_int8_vector_to_rows_edge_values", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_int32", | |
| "notes": "Same row-broadcast shape as ORT's int32 case, using ONNX-valid signed byte edge values." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [-128, -1, 127] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int8", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_col_vector_to_cols_edge_values", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3_int32", | |
| "notes": "Same column-broadcast shape as ORT's int32 case, using ONNX-valid unsigned byte edge values." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [0, 128, 255] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_bool_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3_bool" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "bool", "shape": [1], "data": { "kind": "values", "values": [1] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "bool", | |
| "shape": [3, 3], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1, 1, 1, 1] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_bool_vector_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_bool" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "bool", "shape": [3], "data": { "kind": "values", "values": [0, 1, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "bool", | |
| "shape": [3, 3], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [0, 1, 0, 0, 1, 0, 0, 1, 0] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_bool_col_to_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x3_bool", | |
| "notes": "The requested shape has a leading dimension of 1; ONNX Expand keeps the input's leading dimension of 3 rather than shrinking it." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "bool", "shape": [3, 1], "data": { "kind": "values", "values": [0, 1, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 3] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "bool", | |
| "shape": [3, 3], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [0, 0, 0, 1, 1, 1, 0, 0, 0] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_bool_row_to_four_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_4x1_bool" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "bool", "shape": [1, 4], "data": { "kind": "values", "values": [0, 1, 0, 0] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 1] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "bool", | |
| "shape": [4, 4], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "int8_vec4_path_edge_values", | |
| "inputs": { | |
| "input": { "dtype": "int8", "shape": [1, 4], "data": { "kind": "values", "values": [-128, -1, 0, 127] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int8", "shape": [3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "uint8_vec4_path_broadcast_row", | |
| "inputs": { | |
| "input": { | |
| "dtype": "uint8", | |
| "shape": [1, 8], | |
| "data": { "kind": "values", "values": [0, 64, 128, 192, 255, 1, 127, 254] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [4, 8] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [4, 8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank7_vec4_last_dim_divisible", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 3, 1, 2, 1, 4], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [2, 3, 3, 2, 2, 2, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3, 3, 2, 2, 2, 4], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank8_broadcast", | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 1, 3, 1, 1, 2, 1], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 2, 4, 3, 2, 3, 2, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4, 3, 2, 3, 2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "f16_vec4_row_broadcast", | |
| "provenance": { | |
| "source": "local fixture", | |
| "test": "expand-vec4 `usesF16` arm", | |
| "notes": "A float16 output whose innermost dimension is four exercises vec4 broadcasting and half-precision storage. Expand only copies exactly representable values, so the expected output is exact at tolerance zero." | |
| }, | |
| "inputs": { | |
| "input": { | |
| "dtype": "float16", | |
| "shape": [1, 8], | |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.5, -4.25, 8.0, -16.5, 0.125, 64.0] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 8] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3, 8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "same_shape_identity_vec4", | |
| "provenance": { | |
| "source": "local fixture", | |
| "test": "expand-vec4 `x_same` arm", | |
| "notes": "The requested shape equals the [2,4] input shape, so vectorized expansion is an identity mapping. All eight values are distinct, making any incorrect input offset observable at its output position." | |
| }, | |
| "inputs": { | |
| "input": { | |
| "dtype": "float32", | |
| "shape": [2, 4], | |
| "data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0] } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_scalar_to_3x3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x3_uint8" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [5] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_row_vector_to_rows", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_3x1_uint8" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [11, 22, 33] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [3, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_col_vector_splat_to_four_cols", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/expand_test.cc", | |
| "test": "ExpandOpTest.Expand_1x4_uint8" | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [11, 22, 33] } }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [1, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [3, 4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int64_full_range_int16_broadcast_boundaries", | |
| "inputs": { | |
| "input": { | |
| "dtype": "int64", | |
| "shape": [1, 4], | |
| "data": { | |
| "kind": "cycle", | |
| "values": ["0", "4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1"] | |
| } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int64", "shape": [2, 4], "tolerance": 0, "relTolerance": 0 } }, | |
| "tolerance": 0, | |
| "relTolerance": 0 | |
| }, | |
| { | |
| "name": "int64_full_range_scalar_to_3x3", | |
| "inputs": { | |
| "input": { | |
| "dtype": "int64", | |
| "shape": [1], | |
| "data": { | |
| "kind": "cycle", | |
| "values": ["4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1", "0"] | |
| } | |
| }, | |
| "shape": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 3] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int64", "shape": [3, 3], "tolerance": 0, "relTolerance": 0 } }, | |
| "tolerance": 0, | |
| "relTolerance": 0 | |
| } | |
| ] | |
| } | |