Download build/webgpu/test.json from webgpu-kernels/ai.onnx.Constant: direct link, hf CLI and curl.
- Browser
- Download file 9.7 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Constant/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.Constant@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Constant/resolve/v1/build/webgpu/test.json
9.7 kB
| { | |
| "cases": [ | |
| { | |
| "name": "ort_multivalue_constant_floats", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc", | |
| "test": "ConstantOpTest.MultiValueConstant_floats" | |
| }, | |
| "attrs": { "value_floats": [0, 1, 2, 3] }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "f32_subnormal_literal_values", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc", | |
| "test": "ConstantOpTest.MultiValueConstant_floats", | |
| "notes": "A Constant node with explicit finite subnormal float payloads should materialize those bit patterns without arithmetic." | |
| }, | |
| "attrs": { "value": { "dtype": "float32", "shape": [4], "values": [1e-40, -1e-40, 4e-39, -4e-39] } }, | |
| "inputs": {}, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39, -4e-39] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_multivalue_constant_ints_int32", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc", | |
| "test": "ConstantOpTest.MultiValueConstant_ints", | |
| "notes": "An int32 value_ints attribute exercises a multi-element constant tensor with explicit shape and values." | |
| }, | |
| "attrs": { "value": { "dtype": "int32", "shape": [4], "values": [0, 1, 2, 3] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int32", "shape": [4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_i32_mixed_exact_values", | |
| "attrs": { "value": { "dtype": "int32", "shape": [2, 2], "values": [-123456789, -1, 0, 16777217] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_u32_exact_values", | |
| "attrs": { "value": { "dtype": "uint32", "shape": [2, 2], "values": [0, 1, 16777217, 4000000000] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_int8_edge_values", | |
| "attrs": { "value": { "dtype": "int8", "shape": [2, 2], "values": [-128, -1, 0, 127] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int8", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_uint8_edge_values", | |
| "attrs": { "value": { "dtype": "uint8", "shape": [2, 2], "values": [0, 1, 254, 255] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_int16_edge_values", | |
| "provenance": { | |
| "source": "onnx/onnx/docs/Operators.md#Constant-24", | |
| "notes": "Covers the complete signed int16 range through Constant's literal-value path." | |
| }, | |
| "attrs": { "value": { "dtype": "int16", "shape": [2, 2], "values": [-32768, -1, 0, 32767] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int16", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_bool_values", | |
| "provenance": { | |
| "source": "onnx/onnx/docs/Operators.md#Constant-24", | |
| "notes": "Boolean payloads use widened 0/1 storage; the 2x2 pattern exercises both logical values." | |
| }, | |
| "attrs": { "value": { "dtype": "bool", "shape": [2, 2], "values": [0, 1, 1, 0] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "bool", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_f16_values", | |
| "attrs": { "value": { "dtype": "float16", "shape": [4], "values": [-2, -0.5, 0.25, 3.5] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float16", "shape": [4], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "fill_f32_scalar_attr", | |
| "attrs": { "value_float": -2.5 }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float32", "shape": [] } } | |
| }, | |
| { | |
| "name": "fill_uint32_scalar_attr", | |
| "attrs": { "value": { "dtype": "uint32", "shape": [4], "values": [7, 7, 7, 7] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [4] } } | |
| }, | |
| { | |
| "name": "fill_f16_scalar_attr", | |
| "attrs": { "value": { "dtype": "float16", "shape": [2, 2], "values": [1.25, 1.25, 1.25, 1.25] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float16", "shape": [2, 2] } }, | |
| "tolerance": 0.001 | |
| }, | |
| { | |
| "name": "fill_int8_negative_scalar_attr", | |
| "attrs": { "value": { "dtype": "int8", "shape": [2, 3], "values": [-128, -128, -128, -128, -128, -128] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int8", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_uint8_high_scalar_attr", | |
| "attrs": { "value": { "dtype": "uint8", "shape": [2, 3], "values": [250, 250, 250, 250, 250, 250] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "uint8", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_int16_min_scalar_attr", | |
| "provenance": { | |
| "source": "onnx/onnx/docs/Operators.md#Constant-24", | |
| "notes": "Exercises the scalar-fill path at the signed int16 minimum." | |
| }, | |
| "attrs": { | |
| "value": { "dtype": "int16", "shape": [2, 3], "values": [-32768, -32768, -32768, -32768, -32768, -32768] } | |
| }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int16", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_bool_true_scalar_attr", | |
| "provenance": { | |
| "source": "onnxruntime/test/framework/function_test.cc", | |
| "test": "Constant <value = bool {1}>", | |
| "notes": "Exercises the scalar-fill path for a true ONNX bool constant." | |
| }, | |
| "attrs": { "value": { "dtype": "bool", "shape": [2, 3], "values": [1, 1, 1, 1, 1, 1] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "bool", "shape": [2, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_i32_negative_exact", | |
| "attrs": { | |
| "value": { "dtype": "int32", "shape": [2, 2], "values": [-123456789, -123456789, -123456789, -123456789] } | |
| }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_u32_exact_above_float24", | |
| "attrs": { "value": { "dtype": "uint32", "shape": [3], "values": [16777217, 16777217, 16777217] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "uint32", "shape": [3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_rank0_scalar_output", | |
| "attrs": { "value_float": -3.75 }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "fill_zero_sized_output_noop", | |
| "attrs": { "value": { "dtype": "float32", "shape": [2, 0, 3], "values": [] } }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "onnx_backend_constant", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_constant" }, | |
| "attrs": { | |
| "value": { | |
| "dtype": "float32", | |
| "shape": [5, 5], | |
| "values": [1.764052391052246, 0.40015721321105957, 0.978738009929657, 2.2408931255340576, 1.8675580024719238, -0.9772778749465942, 0.9500884413719177, -0.15135720372200012, -0.10321885347366333, 0.4105985164642334, 0.14404356479644775, 1.4542734622955322, 0.7610377073287964, 0.12167501449584961, 0.44386324286460876, 0.3336743414402008, 1.4940791130065918, -0.2051582634449005, 0.3130677044391632, -0.8540957570075989, -2.5529897212982178, 0.653618574142456, 0.8644362092018127, -0.7421650290489197, 2.269754648208618] | |
| } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [5, 5], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "fill_float_positive_infinity", | |
| "attrs": { "value_float": "Infinity" }, | |
| "inputs": {}, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": ["Infinity"] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "fill_float_negative_infinity", | |
| "attrs": { "value_float": "-Infinity" }, | |
| "inputs": {}, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": ["-Infinity"] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "literal_values_dispatch_cliff_large_f32", | |
| "attrs": { | |
| "value_floats": [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8] | |
| }, | |
| "inputs": {}, | |
| "outputs": { "output": { "dtype": "float32", "shape": [32], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "literal_non_finite_values", | |
| "provenance": { | |
| "notes": "WGSL has no non-finite numeric literals, so a constant containing NaN or Infinity is represented as bit patterns and bitcast at read time. Finite 1.5 and negative zero verify that the bit-pattern representation also preserves ordinary values and the zero sign bit." | |
| }, | |
| "attrs": { "value": { "dtype": "float32", "shape": [5], "values": ["NaN", "Infinity", "-Infinity", -0, 1.5] } }, | |
| "inputs": {}, | |
| "outputs": { | |
| "output": { | |
| "dtype": "float32", | |
| "shape": [5], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": ["NaN", "Infinity", "-Infinity", -0.0, 1.5] }, | |
| "allowNaN": true | |
| } | |
| } | |
| } | |
| ] | |
| } | |