Download build/webgpu/test.json from webgpu-kernels/ai.onnx.Pow: direct link, hf CLI and curl.
- Browser
- Download file 34.1 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Pow/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.Pow@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Pow/resolve/v1/build/webgpu/test.json
34.1 kB
| { | |
| "cases": [ | |
| { | |
| "name": "dispatch_cliff_broadcast_scalar_exp", | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4097, 4097], "data": { "kind": "constant", "value": 1.5 } }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "constant", "value": 2.0 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4097, 4097], "tolerance": 0.0001 } } | |
| }, | |
| { | |
| "name": "same_shape_square", | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [19], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29, "scale": 0.2 } | |
| }, | |
| "y": { "dtype": "float32", "shape": [19], "data": { "kind": "constant", "value": 2.0 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [19], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "negative_base_square", | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [8], | |
| "data": { "kind": "values", "values": [-4.0, -3.0, -2.0, -1.0, 0.0, 1.5, 2.0, 3.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "constant", "value": 2.0 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [8], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "negative_base_square_sustained_4096", | |
| "provenance": { | |
| "notes": "A scalar exponent broadcasts over a sustained float32 payload containing negative bases." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4096], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.011, "cosStep": 0.017, "scale": 2.0 } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "constant", "value": 2.0 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4096], "tolerance": 0.00001, "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "large_square_precision_regression", | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": [-2000.0, 2000.0, -4096.0, 4096.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "negative_one_exponent_finite_subnormal_reciprocal_gpu_gap", | |
| "skipGpu": { | |
| "category": "permanent", | |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes float32 subnormals to zero, so the subnormal base becomes 0 and x^-1 yields Infinity instead of the finite reciprocal." | |
| }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow", | |
| "notes": "Pow(x, -1) is equivalent to reciprocal; subnormal bases can still have finite float32 reciprocals and must not become infinities." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": [1e-38, -1e-38, 4e-39, -4e-39] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [-1.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "negative_one_exponent_same_shape_subnormal_reciprocal_vec4_gpu_gap", | |
| "skipGpu": { | |
| "category": "permanent", | |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes float32 subnormals to zero, so the subnormal base becomes 0 and x^-1 yields Infinity instead of the finite reciprocal." | |
| }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow", | |
| "notes": "Vectorized Pow(x,-1) over same-shape inputs must preserve finite subnormal bases whose reciprocals are representable." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": [1e-38, -1e-38, 4e-39, -4e-39] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-1.0, -1.0, -1.0, -1.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "negative_one_exponent_finite_subnormal_reciprocal_scalar_gpu_gap", | |
| "skipGpu": { | |
| "category": "permanent", | |
| "reason": "Portable WGSL floating-point semantics do not guarantee preservation of the subnormal values required by this fixture. Backend evidence: Metal flushes float32 subnormals to zero, so the subnormal base becomes 0 and x^-1 yields Infinity instead of the finite reciprocal." | |
| }, | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow", | |
| "notes": "Scalar Pow(x,-1) over subnormal bases must remain finite when the reciprocal is representable." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-38, -1e-38, 4e-39] } }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [-1.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "zero_exponent_returns_one", | |
| "provenance": { | |
| "notes": "All eight bases are NaN; exponent zero must still produce one rather than evaluating exp(0*log(x))." | |
| }, | |
| "args": { "constantY": 0 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [8], | |
| "data": { "kind": "values", "values": ["NaN", "NaN", "NaN", "NaN", "NaN", "NaN", "NaN", "NaN"] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "zero_exponent_zero_base_returns_one", | |
| "provenance": { | |
| "notes": "The 0^0 = 1 edge on the same folded constant-1 power chain: an implementation reaching for exp(0 * log(0)) returns NaN from log(0) = -infinity." | |
| }, | |
| "args": { "constantY": 0 }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [8], "data": { "kind": "constant", "value": 0.0 } }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "zero_exponent_infinite_base_returns_one", | |
| "provenance": { | |
| "notes": "The infinite-base edge on the same folded constant-1 power chain: an implementation reaching for exp(0 * log(infinity)) returns NaN from the 0 * infinity product." | |
| }, | |
| "args": { "constantY": 0 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [8], | |
| "data": { | |
| "kind": "values", | |
| "values": ["Infinity", "Infinity", "Infinity", "Infinity", "Infinity", "Infinity", "Infinity", "Infinity"] | |
| } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "negative_base_integer_exponents", | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-2.0, -2.0, -2.0, -2.0] } }, | |
| "y": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [3.0, 4.0, -3.0, -2.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "scalar_sqrt_576", | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [576.0] } }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.5] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [1], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "rank4_broadcast_sqrt", | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "constant", "value": 4.0 } }, | |
| "y": { "dtype": "float32", "shape": [1, 3, 1, 5], "data": { "kind": "constant", "value": 0.5 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [2, 3, 4, 5], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank0_exponent_broadcast", | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [-3.0, -2.0, 0.0, 2.0, 4.0] } }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [5], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "specialized_scalar_exponent_9", | |
| "args": { "constantY": 9 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [8], | |
| "data": { "kind": "values", "values": [-2.0, -1.5, -1.0, 0.0, 0.5, 1.25, 2.0, 3.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [9.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [8], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "specialized_scalar_exponent_9_sustained_4096", | |
| "provenance": { | |
| "notes": "A scalar exponent of 9 exercises the specialized multiplication chain across multiple workgroups." | |
| }, | |
| "args": { "constantY": 9 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4096], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.019, "scale": 0.75 } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [9.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4096], "tolerance": 0.01, "relTolerance": 0.01 } } | |
| }, | |
| { | |
| "name": "specialized_scalar_exponent_negative_9", | |
| "args": { "constantY": -9 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [-2.0, -1.0, -0.5, 0.5, 1.5, 2.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [-9.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [6], "tolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "specialized_scalar_exponent_16", | |
| "args": { "constantY": 16 }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-2.0, -1.25, 0.5, 2.0] } }, | |
| "y": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [16.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "specialized_f16_base_int32_scalar_exponent_5", | |
| "provenance": { | |
| "notes": "Pairs the float16 base/output route with the independently typed int32 exponent while retaining the constant-exponent specialization." | |
| }, | |
| "args": { "constantY": 5 }, | |
| "inputs": { | |
| "x": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [-2.0, -1.0, 0.5, 2.0] } }, | |
| "y": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [5] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float16", "shape": [4], "tolerance": 0.05 } } | |
| }, | |
| { | |
| "name": "ort_float_2x2", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_Float" | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2, 2], | |
| "data": { "kind": "values", "values": [2.0, 2.0, 1.4142135623730951, 1.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [0.0, 8.0, 2.0, 9.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_broadcast_scalar_base", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_Broadcast_Scalar0" | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } }, | |
| "y": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_broadcast_scalar_exponent", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_Broadcast_Scalar1" | |
| }, | |
| "args": { "constantY": 2 }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_broadcast_scalar_int32_exponent", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_Broadcast_Scalar1_float_int32_12" | |
| }, | |
| "args": { "constantY": 3 }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [3] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_float_int8_exponent_extremes_vec4", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/dnnl/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.DNNL_Pow_Broadcast_Scalar1_float_int8_12", | |
| "notes": "Extends ORT's int8 exponent case to a bound same-shape vec4 route and the signed int8 extrema." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -1.0, 2.0, 0.5] } }, | |
| "y": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-128, 127, -3, 3] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "tolerance": 0.000001, | |
| "data": { "kind": "values", "values": [1.0, -1.0, 0.125, 0.125] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_float_uint8_exponent_extremes_vec4", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/dnnl/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.DNNL_Pow_Broadcast_Scalar1_float_uint8_12", | |
| "notes": "Extends ORT's uint8 exponent case to a bound same-shape vec4 route and the unsigned uint8 maximum." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -1.0, 2.0, 0.5] } }, | |
| "y": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [255, 254, 3, 2] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "tolerance": 0.000001, | |
| "data": { "kind": "values", "values": [1.0, 1.0, 8.0, 0.25] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_float_int16_exponent_extremes_vec4", | |
| "provenance": { | |
| "source": "onnx/onnx/docs/Operators.md#Pow-15", | |
| "notes": "Covers the ONNX-standard int16 exponent route with a bound same-shape vec4 and both signed extrema." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -1.0, 2.0, 0.5] } }, | |
| "y": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [-32768, 32767, -3, 3] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "tolerance": 0.000001, | |
| "data": { "kind": "values", "values": [1.0, -1.0, 0.125, 0.125] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_float_int32_exponent", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_float_int32" | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, 5, 6] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "ort_int32_float_exponent", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_int32_float" | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } }, | |
| "y": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [4.0, 5.0, 6.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "int32", "shape": [3], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_int32_float_scalar_exponent_one_exact_above_float24", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_int32_float", | |
| "notes": "Extends ORT's int32-base/float-exponent coverage with exponent 1 values above f32's exact integer range." | |
| }, | |
| "args": { "constantY": 1 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "int32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [-16777218, -16777217, -16777216, 16777216, 16777217, 16777218] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "int32", | |
| "shape": [6], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [-16777218, -16777217, -16777216, 16777216, 16777217, 16777218] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_int32_float_vector_exponent_one_exact_above_float24", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_int32_float", | |
| "notes": "Extends ORT's int32-base/float-exponent coverage with generic broadcast exponent 1 values above f32's exact integer range." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "int32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [-16777218, -16777217, -16777216, 16777216, 16777217, 16777218] } | |
| }, | |
| "y": { | |
| "dtype": "float32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0] } | |
| } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "int32", | |
| "shape": [6], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [-16777218, -16777217, -16777216, 16777216, 16777217, 16777218] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "ort_float16_2x2", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.Pow_float16_float16" | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float16", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": [2.0, 2.0, 1.4142135623730951, 1.0] } | |
| }, | |
| "y": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.0, 8.0, 2.0, 9.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float16", "shape": [4], "tolerance": 0.001 } } | |
| }, | |
| { | |
| "name": "onnx_backend_pow", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow" }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [3, 4, 5], | |
| "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, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0] | |
| } | |
| }, | |
| "y": { | |
| "dtype": "float32", | |
| "shape": [3, 4, 5], | |
| "data": { | |
| "kind": "values", | |
| "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, -1.4543657302856445, 0.04575851559638977, -0.18718385696411133, 1.5327792167663574, 1.4693588018417358, 0.154947429895401, 0.37816253304481506, -0.8877857327461243, -1.980796456336975, -0.34791216254234314, 0.15634897351264954, 1.2302906513214111, 1.202379822731018, -0.38732680678367615, -0.302302747964859, -1.0485529899597168, -1.420017957687378, -1.7062702178955078, 1.950775384902954, -0.5096521973609924, -0.4380742907524109, -1.2527953386306763, 0.7774903774261475, -1.6138978004455566, -0.21274028718471527, -0.8954665660858154, 0.38690251111984253, -0.5108051300048828, -1.18063223361969, -0.02818222902715206, 0.4283318817615509, 0.06651721894741058, 0.30247190594673157, -0.6343221068382263, -0.3627411723136902] | |
| } | |
| } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.002 } } | |
| }, | |
| { | |
| "name": "onnx_backend_pow_bcast_array", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_bcast_array" }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2, 3], | |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.0001 } } | |
| }, | |
| { | |
| "name": "onnx_backend_pow_bcast_scalar", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_bcast_scalar" }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.0001 } } | |
| }, | |
| { | |
| "name": "onnx_backend_pow_example", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_example" }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [4.0, 5.0, 6.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0.0002 } } | |
| }, | |
| { | |
| "name": "wgsl_builtin_positive_base", | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [0.25, 0.5, 1.0, 1.5, 2.0, 4.0] } | |
| }, | |
| "y": { | |
| "dtype": "float32", | |
| "shape": [6], | |
| "data": { "kind": "values", "values": [-2.0, 0.5, 3.0, -0.75, 2.5, 1.25] } | |
| } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [6], "tolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "ort_dim_zero_equal_rank", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.DimWithZeroHandling", | |
| "notes": "Projected from ORT's binary elementwise zero-dimension Add coverage to generic ONNX multidirectional broadcasting." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "float32", "shape": [3, 0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3, 0], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "ort_dim_zero_scalar_broadcast", | |
| "provenance": { | |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", | |
| "test": "MathOpTest.DimWithZeroHandling", | |
| "notes": "Projected from ORT's binary elementwise zero-dimension Add coverage to generic ONNX multidirectional broadcasting." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } }, | |
| "y": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [0], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "onnx_backend_types_float32_int32", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_types_float32_int32" }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, 5, 6] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "float32", | |
| "shape": [3], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [1.0, 32.0, 729.0] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_types_float32_uint32", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_types_float32_uint32" }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } }, | |
| "y": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 5, 6] } } | |
| }, | |
| "outputs": { | |
| "z": { | |
| "dtype": "float32", | |
| "shape": [3], | |
| "tolerance": 0, | |
| "data": { "kind": "values", "values": [1.0, 32.0, 729.0] } | |
| } | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_types_int32_float32", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_types_int32_float32" }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } }, | |
| "y": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [4.0, 5.0, 6.0] } } | |
| }, | |
| "outputs": { | |
| "z": { "dtype": "int32", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [1, 32, 729] } } | |
| } | |
| }, | |
| { | |
| "name": "onnx_backend_types_int32_int32", | |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_pow_types_int32_int32" }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } }, | |
| "y": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, 5, 6] } } | |
| }, | |
| "outputs": { | |
| "z": { "dtype": "int32", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [1, 32, 729] } } | |
| } | |
| }, | |
| { | |
| "name": "inf_nan_base_zero_even_odd_exponents_same_shape_vec4", | |
| "provenance": { | |
| "notes": "Vectorized same-shape inputs exercise deterministic exponent shortcuts for 0, 2, and 3. They require Pow(infinity,0)=1, Pow(NaN,0)=1, Pow(-infinity,2)=infinity, and Pow(infinity,3)=infinity." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4], | |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN", "Infinity"] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [0.0, 2.0, 0.0, 3.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "tolerance": 0, "allowNaN": true } } | |
| }, | |
| { | |
| "name": "inf_nan_base_square_scalar_broadcast", | |
| "provenance": { | |
| "notes": "A broadcast scalar exponent of 2 exercises the exact multiplication shortcut and requires positive or negative infinity to map to infinity while NaN remains NaN." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [3], | |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN"] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [3], "tolerance": 0, "allowNaN": true } } | |
| }, | |
| { | |
| "name": "negative_base_negative_even_exponent_broadcast_custom", | |
| "provenance": { | |
| "notes": "Negative bases with negative integer exponents -4, -5, and -6 exercise reciprocal magnitudes and odd/even sign restoration outside the specialized exponent cases." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-2.0, -2.0, -3.0, -4.0] } }, | |
| "y": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-4.0, -6.0, -5.0, -4.0] } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [4], "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "same_shape_vec4_2d_dispatch_fold_last_vec_guard", | |
| "requires": { "limits": { "maxBufferSize": 268435472, "maxStorageBufferBindingSize": 268435472 } }, | |
| "provenance": { | |
| "notes": "A 67,108,868-element float32 Pow (exponent 2) is 16,777,217 vec4 words, one past 2^24; a nonzero 4-value cyclic base checks the final vec4. Its ~256 MB tensors need above-minimum buffer and storage-binding limits, so adapters without them skip it." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [67108868], | |
| "data": { "kind": "cycle", "values": [0.5, -0.75, 1.25, -1.5] } | |
| }, | |
| "y": { "dtype": "float32", "shape": [67108868], "data": { "kind": "constant", "value": 2.0 } } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [67108868], "relTolerance": 0.00001 } } | |
| }, | |
| { | |
| "name": "rank7_broadcast_scalar_tail", | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 2, 1, 2, 1, 3], | |
| "data": { "kind": "cycle", "values": [0.5, 1.0, 1.5, 2.0] } | |
| }, | |
| "y": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 1, 2, 1, 2, 1], | |
| "data": { "kind": "cycle", "values": [1.0, 2.0, 3.0] } | |
| } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [2, 2, 2, 2, 2, 2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "rank8_broadcast_alternating", | |
| "attrs": {}, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2, 1, 2, 1, 2, 1, 2, 3], | |
| "data": { "kind": "cycle", "values": [1.5, 2.0, 0.5, 3.0] } | |
| }, | |
| "y": { | |
| "dtype": "float32", | |
| "shape": [1, 2, 1, 2, 1, 2, 1, 1], | |
| "data": { "kind": "cycle", "values": [2.0, 1.0] } | |
| } | |
| }, | |
| "outputs": { "z": { "dtype": "float32", "shape": [2, 2, 2, 2, 2, 2, 2, 3], "tolerance": 0.000001 } } | |
| }, | |
| { | |
| "name": "int32_base_negative_scalar_exponent", | |
| "provenance": { | |
| "notes": "A negative constant exponent over an integer base uses f32 exponentiation followed by integer truncation. Bases of +1 and -1 survive the reciprocal, while larger magnitudes truncate to zero, producing a nonuniform output." | |
| }, | |
| "args": { "constantY": -1 }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [1, -1, 2, -2, 3, -3, 1, -1] } }, | |
| "y": { "dtype": "int32", "shape": [1], "data": { "kind": "constant", "value": -1 } } | |
| }, | |
| "outputs": { "z": { "dtype": "int32", "shape": [8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int32_base_uint32_exponent_tensor", | |
| "provenance": { | |
| "notes": "An unsigned exponent tensor over an integer base checks the uint32 exponent load. Exponents above 31 also exercise the floating-point fallback for large powers." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [2, 2, 2, 2, 2, -2, 1, -1] } }, | |
| "y": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [0, 1, 2, 3, 10, 3, 31, 40] } } | |
| }, | |
| "outputs": { "z": { "dtype": "int32", "shape": [8], "tolerance": 0 } } | |
| }, | |
| { | |
| "name": "int32_exponent_parity_above_float_exact_range", | |
| "provenance": { | |
| "notes": "An integer exponent above 31 leaves the exact integer-power route and is carried as f32, but f32 cannot separate consecutive integers past 2^24: 16777217 rounds to an even value. A negative base then takes the sign of the wrong parity even though the answer, plus or minus one, is exact at every exponent. Zero tolerance -- the middle entry is the only even one." | |
| }, | |
| "inputs": { | |
| "x": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-1, -1, -1] } }, | |
| "y": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [16777215, 16777216, 16777217] } } | |
| }, | |
| "outputs": { | |
| "z": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-1, 1, -1] }, "tolerance": 0 } | |
| } | |
| } | |
| ] | |
| } | |