Download build/webgpu/test.json from webgpu-kernels/ai.onnx.GatherElements: direct link, hf CLI and curl.
- Browser
- Download file 27.6 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.GatherElements/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.GatherElements@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.GatherElements/resolve/v1/build/webgpu/test.json
27.6 kB
| { | |
| "fixtureArrays": { | |
| "rank2_vec4_axis0_signed_indices_input_indices": [0, 1, 2, -1, -2, -3, 1, 0, 2, 0, -1, 1, -3, 2, 0, -2] | |
| }, | |
| "cases": [ | |
| { | |
| "name": "dispatch_cliff_axis0_16M", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [1, 1], "data": { "kind": "constant", "value": 7.0 } }, | |
| "indices": { "dtype": "int32", "shape": [16777216, 1], "data": { "kind": "constant", "value": 0 } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [16777216, 1], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "axis1", | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 4], | |
| "data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [3, 1, 0, 2, 2, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3] } } | |
| }, | |
| { | |
| "name": "axis1_many_rows_int32_indices_f32", | |
| "provenance": { | |
| "notes": "A compact axis-1 GatherElements performs row-wise column gathers over many rows without benchmark-scale tensors." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [128, 256], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.015, "cosStep": 0.023, "scale": 0.2 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [128, 64], | |
| "data": { "kind": "cycle", "values": [0, 17, 63, 128, 255, 3, 42, 191] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [128, 64], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank2_vec4_axis0_signed_indices", | |
| "provenance": { | |
| "notes": "Exercises the four-output rank-2 path along axis 0 with independent signed indices in every vector lane." | |
| }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [3, 8], "data": { "kind": "linspace", "start": -4.0, "end": 19.0 } }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 8], | |
| "data": { | |
| "kind": "values", | |
| "values": { "$ref": "#/fixtureArrays/rank2_vec4_axis0_signed_indices_input_indices" } | |
| } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "axis2_f16", | |
| "attrs": { "axis": 2 }, | |
| "inputs": { | |
| "data": { "dtype": "float16", "shape": [1, 2, 4] }, | |
| "indices": { "dtype": "int32", "shape": [1, 2, 2], "data": { "kind": "values", "values": [0, 3, 1, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [1, 2, 2] } }, | |
| "tolerance": 0.001 | |
| }, | |
| { | |
| "name": "rank3_axis1", | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 3, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0, 20.0, 21.0, 22.0, 23.0, 100.0, 101.0, 102.0, 103.0, 110.0, 111.0, 112.0, 113.0, 120.0, 121.0, 122.0, 123.0] | |
| } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 2, 4], | |
| "data": { "kind": "values", "values": [2, 0, 1, 2, 1, 1, 0, 0, 0, 2, 2, 1, 2, 1, 0, 1] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 4], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank5_axis0", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 2, 2, 1, 2], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [1, 2, 2, 1, 2], | |
| "data": { "kind": "values", "values": [1, 0, 0, 1, 1, 1, 0, 0] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 2, 1, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank6_axis5", | |
| "attrs": { "axis": 5 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 1, 2, 1, 3], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [1, 2, 1, 2, 1, 2], | |
| "data": { "kind": "values", "values": [2, 0, 1, 2, 0, 1, 2, 1] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 2, 1, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "backend_axis0_2d", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [3, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 2, 0, 2, 0, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_int32_negative_indices_axis1", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Negative int32 index behavior from ORT's GatherElements wrapper, adapted to float data." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 4], | |
| "data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [-1, -3, 1, -2, -1, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_int32_negative_indices_last_axis_rank3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Negative axis and negative int32 index behavior from ORT's GatherElements wrapper." | |
| }, | |
| "attrs": { "axis": -1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 4], | |
| "data": { "kind": "values", "values": [0.0, 1.0, 2.0, 3.0, 10.0, 11.0, 12.0, 13.0] } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [1, 2, 3], | |
| "data": { "kind": "values", "values": [-1, 0, -2, -3, -1, 1] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_default_axis_rank2_float", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Deterministic equivalent of RunTestWrapper's default-axis rank-2 shape." | |
| }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [1, 2], "data": { "kind": "values", "values": [0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_axis1_rank2_float", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Deterministic equivalent of RunTestWrapper's axis=1 rank-2 shape." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 0, 0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_negative_axis_rank2_float", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Deterministic equivalent of RunTestWrapper's negative-axis rank-2 shape." | |
| }, | |
| "attrs": { "axis": -1 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [-1, 0, -2, -1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_axis1_rank3_float", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Deterministic equivalent of RunTestWrapper's rank-3 axis=1 shape." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 2, 2], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [1, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_axis2_rank3_float", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.float", | |
| "notes": "Deterministic equivalent of RunTestWrapper's rank-3 axis=2 shape." | |
| }, | |
| "attrs": { "axis": 2 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 2, 2], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_rank6_axis5_float16", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.MLFloat16", | |
| "notes": "Rank-6 axis=5 shape mirrors ORT's wrapper while staying inside this manifest's rank limit." | |
| }, | |
| "attrs": { "axis": 5 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float16", | |
| "shape": [2, 1, 2, 3, 1, 2], | |
| "data": { | |
| "kind": "values", | |
| "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0] | |
| } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 1, 2, 2, 1, 2], | |
| "data": { "kind": "values", "values": [0, -1, 1, 0, -1, 0, 0, 1, 1, -1, 0, 0, -1, 1, 1, 0] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 1, 2, 2, 1, 2], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "ort_axis1_rank2_int32_data", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.int32_t" | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 0, 0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_axis1_rank2_int16_data", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.int16_t" | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "int16", "shape": [2, 2], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 0, 0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int16", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_axis1_rank2_uint32_data", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.uint32_t", | |
| "notes": "Deterministic equivalent of RunTestWrapper's rank-2 axis-1 unsigned payload coverage." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "uint32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 2, 3, 4] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [1, 0, 0, 1] } } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "uint32", | |
| "shape": [2, 2], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [2, 1, 3, 4] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_int8_axis1_edge_values", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.int8_t", | |
| "notes": "Compact signed-byte fixture using ORT's axis-1 GatherElements coverage with negative indices." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "int8", "shape": [2, 3], "data": { "kind": "values", "values": [-128, -1, 0, 1, 2, 127] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [2, 0, -1, -2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int8", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_uint8_default_axis0_edge_values", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.uint8_t", | |
| "notes": "Compact unsigned-byte fixture using ORT's default-axis GatherElements coverage." | |
| }, | |
| "inputs": { | |
| "data": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [0, 255, 1, 254, 2, 253] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [2, 0, 1, -1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "onnx_backend_gather_elements_0", | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 2], "data": { "kind": "values", "values": [0, 0, 1, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_gather_elements_0", | |
| "notes": "ONNX int64 index values are adapted to supported int32 where representable." | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_gather_elements_1", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [3, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 2, 0, 2, 0, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_gather_elements_1", | |
| "notes": "ONNX int64 index values are adapted to supported int32 where representable." | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_gather_elements_negative_indices", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [3, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [-1, -2, 0, -2, 0, 0] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_gather_elements_negative_indices", | |
| "notes": "ONNX int64 index values are adapted to supported int32 where representable." | |
| } | |
| }, | |
| { | |
| "name": "int32_axis1_exact_above_float24", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.int32_t", | |
| "notes": "Guards signed integer gather against accidental f32 conversion, using values above the exact f32 integer range." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "int32", | |
| "shape": [2, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [16777217, -16777219, 33554435, -33554437, 2147483000, -2147483000, 123456789, -123456789] | |
| } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [0, -1, 1, -2, 0, -1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "zero_sized_indices_axis1", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "notes": "Covers the valid empty-output path with an empty indices tensor." | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 0], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_big_indices_axis0_parallel_shape", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.BigIndices" | |
| }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 10000], | |
| "data": { "kind": "linspace", "start": 0.0, "end": 19999.0 } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [1, 10000], "data": { "kind": "constant", "value": 0 } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 10000], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_bool_axis1_negative_indices", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.bool" | |
| }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 1, 0, 1, 0] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [0, -1, 1, -1, 0, -2] } } | |
| }, | |
| "outputs": { | |
| "output": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [1, 1, 0, 0, 0, 1] } } | |
| } | |
| }, | |
| { | |
| "name": "ort_bool_default_axis0", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.bool" | |
| }, | |
| "inputs": { | |
| "data": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 0, 0, 1, 1] } }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [1, 0, 1, 0, 1, 0] } } | |
| }, | |
| "outputs": { | |
| "output": { "dtype": "bool", "shape": [2, 3], "data": { "kind": "values", "values": [0, 0, 1, 1, 1, 0] } } | |
| } | |
| }, | |
| { | |
| "name": "ort_bool_axis2_rank3", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/gather_elements_op_test.cc", | |
| "test": "GatherElementsOpTest.bool" | |
| }, | |
| "attrs": { "axis": 2 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "bool", | |
| "shape": [2, 2, 2], | |
| "data": { "kind": "values", "values": [1, 0, 1, 0, 1, 0, 1, 0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [1, 2, 1], "data": { "kind": "values", "values": [0, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "bool", "shape": [1, 2, 1], "data": { "kind": "values", "values": [1, 0] } } } | |
| }, | |
| { | |
| "name": "rank1_axis0_int32", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [10.0, 11.0, 12.0, 13.0, 14.0, 15.0] } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [5, 0, 3, -1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank4_axis2_f16", | |
| "attrs": { "axis": 2 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float16", | |
| "shape": [2, 2, 4, 2], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 2, 3, 2], | |
| "data": { | |
| "kind": "values", | |
| "values": [0, 3, 1, 2, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 1, 2, 0, 3, 3, 1, 2, 0] | |
| } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 2, 3, 2], "tolerance": 0.002 } } | |
| }, | |
| { | |
| "name": "rank4_axis0_int32_indices", | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [3, 2, 2, 2], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 2, 2, 2], | |
| "data": { "kind": "values", "values": [2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 0, 2, 2, 1, 0, 0] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 2, 2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank6_axis2_large_output_vs_data_on_axis", | |
| "provenance": { | |
| "notes": "Data shape [1,2,3,1,2,2] and index shape [1,2,5,1,2,2] differ on axis 2. Leading-coordinate extraction must use output stride 20, while data addressing uses stride 12." | |
| }, | |
| "attrs": { "axis": 2 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 3, 1, 2, 2], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.17 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [1, 2, 5, 1, 2, 2], | |
| "data": { "kind": "cycle", "values": [0, 1, 2, -1, -2, 0, 1, 2, -1, -2] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 5, 1, 2, 2] } } | |
| }, | |
| { | |
| "name": "rank7_last_axis", | |
| "attrs": { "axis": 6 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 2, 1, 2, 1, 4], | |
| "data": { "kind": "linspace", "start": 0.0, "end": 31.0 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 1, 2, 1, 2, 1, 3], | |
| "data": { "kind": "cycle", "values": [3, 1, 0] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank8_last_axis", | |
| "attrs": { "axis": 7 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 2, 1, 2, 1, 2, 4], | |
| "data": { "kind": "linspace", "start": 1.0, "end": 64.0 } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 1, 2, 1, 2, 1, 2, 3], | |
| "data": { "kind": "cycle", "values": [0, 2, 3, 1] } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank3_last_axis_row_vec4", | |
| "provenance": { | |
| "source": "ONNX GatherElements-13 specification", | |
| "notes": "A last-axis gather at rank 3 whose leading axes flatten to a row index: the row width is a multiple of four and every row selects a different permutation." | |
| }, | |
| "attrs": { "axis": -1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "float32", | |
| "shape": [2, 3, 8], | |
| "data": { | |
| "kind": "values", | |
| "values": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0] | |
| } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 3, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [7, 0, 3, 5, 1, 6, 2, 4, 0, 7, 5, 1, 6, 2, 4, 0, 3, 5, 7, 1, 2, 4, 6, 0] | |
| } | |
| } | |
| }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [2, 3, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [7.0, 0.0, 3.0, 5.0, 9.0, 14.0, 10.0, 12.0, 16.0, 23.0, 21.0, 17.0, 30.0, 26.0, 28.0, 24.0, 35.0, 37.0, 39.0, 33.0, 42.0, 44.0, 46.0, 40.0] | |
| }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "int64_full_range_axis1", | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "int64", | |
| "shape": [2, 4], | |
| "data": { | |
| "kind": "cycle", | |
| "values": ["0", "4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1"] | |
| } | |
| }, | |
| "indices": { "dtype": "int32", "shape": [2, 3], "data": { "kind": "values", "values": [3, 1, 0, 2, 2, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "int64", "shape": [2, 3], "tolerance": 0, "relTolerance": 0 } }, | |
| "tolerance": 0, | |
| "relTolerance": 0 | |
| }, | |
| { | |
| "name": "int64_full_range_rank2_vec4_axis0_signed_indices", | |
| "provenance": { | |
| "notes": "Exercises the four-output rank-2 path along axis 0 with independent signed indices in every vector lane." | |
| }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "data": { | |
| "dtype": "int64", | |
| "shape": [3, 8], | |
| "data": { | |
| "kind": "cycle", | |
| "values": ["4294967296", "8589934593", "-4294967297", "9223372036854775807", "-9223372036854775808", "9223372036854775806", "-1", "0"] | |
| } | |
| }, | |
| "indices": { | |
| "dtype": "int32", | |
| "shape": [2, 8], | |
| "data": { | |
| "kind": "values", | |
| "values": { "$ref": "#/fixtureArrays/rank2_vec4_axis0_signed_indices_input_indices" } | |
| } | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "int64", "shape": [2, 8], "tolerance": 0, "relTolerance": 0 } }, | |
| "tolerance": 0, | |
| "relTolerance": 0 | |
| } | |
| ] | |
| } | |