Download build/webgpu/test.json from webgpu-kernels/ai.onnx.ConstantOfShape: direct link, hf CLI and curl.
- Browser
- Download file 17.6 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.ConstantOfShape/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.ConstantOfShape@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.ConstantOfShape/resolve/v1/build/webgpu/test.json
17.6 kB
| { | |
| "usageCase": "zero_default", | |
| "cases": [ | |
| { | |
| "name": "zero_default", | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 3] } } | |
| }, | |
| { | |
| "name": "f32_vec4_fill_4096", | |
| "provenance": { | |
| "notes": "A compact vec4-aligned float32 output exercises flat ConstantOfShape filling without benchmark-scale storage." | |
| }, | |
| "attrs": { "value": -10000 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [4096] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4096], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "f32_subnormal_fill_value", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.Float_Ones", | |
| "notes": "Valid float32 fill value below the normal range; the uniform-to-storage fill path must preserve finite subnormal payloads." | |
| }, | |
| "attrs": { "value": 1e-40 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [4] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [1e-40, 1e-40, 1e-40, 1e-40] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "f32_positive_infinity_fill", | |
| "attrs": { "value": "Infinity" }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [4] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": ["Infinity", "Infinity", "Infinity", "Infinity"] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "f32_negative_infinity_fill", | |
| "attrs": { "value": "-Infinity" }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [3] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [3], | |
| "data": { "kind": "values", "values": ["-Infinity", "-Infinity", "-Infinity"] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "f16_fill", | |
| "attrs": { "value": 1.5 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 4] } } }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [1, 2, 4] } }, | |
| "tolerance": 0.001 | |
| }, | |
| { | |
| "name": "scalar_output_empty_shape", | |
| "attrs": { "value": -4.25 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank7_output_fill", | |
| "attrs": { "value": -2.75 }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [7], "data": { "kind": "values", "values": [1, 2, 1, 3, 1, 2, 2] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 2, 1, 3, 1, 2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "zero_sized_output_fill", | |
| "attrs": { "value": 6.5 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 0, 3] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_int32_zeros_10x6", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.Int32_Zeros" | |
| }, | |
| "attrs": { "value": 0 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [10, 6] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [10, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int32_negative_fill_exact", | |
| "attrs": { "value": -17 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 1, 3] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 1, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "uint32_fill_exact_above_float24", | |
| "attrs": { "value": 16777217 }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_float_ones_4x3x2", | |
| "attrs": { "value": 1 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.Float_Ones" | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 3, 2] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 3, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_default_value_float_zeros_2x6", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.DefaultValue" | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_float16_bits_value", | |
| "attrs": { "value": 2.980232238769531e-7 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "FLOAT16 typed value from raw bits 5, represented as its numeric half value." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_uint32_2x6", | |
| "attrs": { "value": 32 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "UINT32 typed value." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_int32_exact_above_float24", | |
| "attrs": { "value": 20000001 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "INT32 typed value variant extended above f32's exact integer range." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_int16_2x6", | |
| "attrs": { "value": 16 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "INT16 typed value from ORT's ConstantOfShape TypeTests." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "int16", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_int16_min_fill", | |
| "attrs": { "value": -32768 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "Signed int16 sentinel extension of ORT's typed ConstantOfShape TypeTests." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "int16", | |
| "shape": [2, 3], | |
| "data": { "kind": "values", "values": [-32768, -32768, -32768, -32768, -32768, -32768] }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_type_test_uint32_large_exact", | |
| "attrs": { "value": 4000000001 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "UINT32 typed value variant extended above f32's exact integer range." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_int8_min_fill", | |
| "attrs": { "value": -128 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "Exercises the same typed TensorProto value path as ORT's int8 TypeTests with a signed edge value." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "int8", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_type_test_uint8_high_fill", | |
| "attrs": { "value": 250 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "Exercises the same typed TensorProto value path as ORT's uint8 TypeTests with a high logical byte value." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 6] } } }, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [2, 6], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "bool_true_fill", | |
| "attrs": { "value": 1 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc", | |
| "test": "ConstantOfShape.TypeTests", | |
| "notes": "A scalar true value must fill every element of the logical bool output." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 3] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "bool", | |
| "shape": [2, 3], | |
| "data": { "kind": "values", "values": [1, 1, 1, 1, 1, 1] }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_constantofshape_float_ones", | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 3, 2] } } }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4, 3, 2] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_constantofshape_float_ones", | |
| "notes": "The integer shape tensor exactly represents the source ONNX int64 dimensions." | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_constantofshape_int_shape_zero", | |
| "inputs": { "input": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [0] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_constantofshape_int_shape_zero", | |
| "notes": "The integer shape tensor exactly represents the source ONNX int64 dimensions, and the scalar `value` attribute represents the single-element ONNX value tensor." | |
| }, | |
| "attrs": { "value": 0 } | |
| }, | |
| { | |
| "name": "onnx_backend_constantofshape_int_zeros", | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [10, 6] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [10, 6] } }, | |
| "provenance": { | |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_constantofshape_int_zeros", | |
| "notes": "The integer shape tensor exactly represents the source ONNX int64 dimensions, and the scalar `value` attribute represents the single-element ONNX value tensor." | |
| }, | |
| "attrs": { "value": 0 } | |
| }, | |
| { | |
| "name": "rank8_output_scalar_fill", | |
| "attrs": { "value": 3.5 }, | |
| "provenance": { | |
| "source": "onnx spec: ConstantOfShape output rank = len(shape input), unbounded", | |
| "notes": "Fills a rank-8 tensor with the scalar float32 value 3.5." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 1, 2, 1, 2, 1, 2, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 1, 2, 1, 2, 1, 2, 1], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank8_output_oddnumel_fill", | |
| "attrs": { "value": -1.25 }, | |
| "provenance": { | |
| "source": "onnx spec: ConstantOfShape arbitrary output rank", | |
| "notes": "A rank-8 float32 output with 18 elements requires the scalar fill path because its element count is not divisible by four. The expected output is the requested shape filled uniformly with the attribute value." | |
| }, | |
| "inputs": { | |
| "input": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 1, 3, 1, 1, 3, 1, 1] } } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 1, 3, 1, 1, 3, 1, 1], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "f16_oddnumel_scalar_fill", | |
| "attrs": { "value": -2.5 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc (TypeTests float16)", | |
| "notes": "A 15-element float16 output exercises the scalar fill path because its element count is not divisible by four. The value is exactly representable in float16." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 5] } } }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3, 5], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "u32_oddnumel_scalar_fill", | |
| "attrs": { "value": 7 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc (TypeTests uint32)", | |
| "notes": "A 15-element uint32 output checks the final three-element tail after four-wide groups." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [3, 5] } } }, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3, 5], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int32_vec4_fill_16m_2dfold_correctness", | |
| "attrs": { "value": 123456789 }, | |
| "provenance": { | |
| "source": "onnx spec: ConstantOfShape flat memset; 2D dispatch-fold guard", | |
| "notes": "An 8,192 x 8,192 int32 output has 67,108,864 elements; every element, including those in the final row, must equal 123456789." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [8192, 8192] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "int32", | |
| "shape": [8192, 8192], | |
| "data": { "kind": "constant", "value": 123456789 }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "i32_vec4_min_int32_fill_exact", | |
| "attrs": { "value": -2147483648 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc (TypeTests int32) extended to INT32_MIN", | |
| "notes": "Eight int32 outputs must all equal the signed minimum value -2147483648 exactly." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "int32", | |
| "shape": [2, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [-2147483648, -2147483648, -2147483648, -2147483648, -2147483648, -2147483648, -2147483648, -2147483648] | |
| }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "u32_vec4_max_uint32_fill_exact", | |
| "attrs": { "value": 4294967295 }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/generator/constant_of_shape_test.cc (TypeTests uint32) extended to UINT32_MAX", | |
| "notes": "Eight uint32 outputs must all retain the exact unsigned maximum value 4294967295 without a float32 round-trip." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 4] } } }, | |
| "outputs": { | |
| "output": { | |
| "dtype": "uint32", | |
| "shape": [2, 4], | |
| "data": { | |
| "kind": "values", | |
| "values": [4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295] | |
| }, | |
| "tolerance": 0 | |
| } | |
| } | |
| }, | |
| { | |
| "name": "i32_vec4_dim1_first_zero_sized_output", | |
| "attrs": { "value": -17 }, | |
| "provenance": { | |
| "source": "onnx spec: ConstantOfShape with a zero extent -> empty output; array<T,0> compile-crash class", | |
| "notes": "Shape [0,5,3] has zero elements; setup must handle the leading zero extent without dispatch or invalid array construction." | |
| }, | |
| "inputs": { "input": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [0, 5, 3] } } }, | |
| "outputs": { "output": { "dtype": "int32", "shape": [0, 5, 3], "tolerance": 0 } } | |
| } | |
| ] | |
| } | |