{ "op": "ai.onnx.Pow", "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": "Compact sibling for the negative-base square benchmark; preserves scalar exponent broadcast over a sustained f32 payload." }, "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": "Same-shape vec4 companion for Pow(x, -1): finite subnormal bases have representable reciprocals and must not be flushed before division." }, "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-path companion: 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": "A folded exponent of zero selects the specialized constant-1 power chain that reads no input. IEEE and NumPy both give 1 for every base, so the uniform output is the assertion: an implementation reaching for exp(0 * log(x)) returns NaN on three of these eight." }, "sourceContext": { "constantScalars": { "Y": 0 } }, "inputs": { "x": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [-3.0, -0.0, 0.0, 0.5, 2.0, "Infinity", "-Infinity", "NaN"] } }, "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", "sourceContext": { "constantScalars": { "Y": 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": "Compact sibling for the scalar-exponent-9 benchmark; keeps the specialized chain over enough elements to validate dispatch behavior." }, "sourceContext": { "constantScalars": { "Y": 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", "sourceContext": { "constantScalars": { "Y": -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", "sourceContext": { "constantScalars": { "Y": 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." }, "sourceContext": { "constantScalars": { "Y": 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" }, "sourceContext": { "constantScalars": { "Y": 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" }, "sourceContext": { "constantScalars": { "Y": 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." }, "sourceContext": { "constantScalars": { "Y": 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": "Edge-value propagation through the same_shape_vec4 path (numel%4==0). Only deterministic short-circuit branches of pow_custom are exercised (b==0 -> 1, b==2 -> a*a, b==3 -> a*a*a); no Metal pow() builtin. Pow(inf,0)=1, Pow(NaN,0)=1, Pow(-inf,2)=inf, Pow(inf,3)=inf per IEEE/numpy." }, "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": "Edge-value propagation through the scalar broadcast fallback (pow.wgsl.jinja, scalar Y not flagged constant -> custom mode). b==2 short-circuit -> a*a only, no Metal pow() builtin. Pow(inf,2)=inf, Pow(-inf,2)=inf, Pow(NaN,2)=NaN per IEEE/numpy." }, "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": "Exercises the pow_custom negative-base sign branch (magnitude=pow(abs(a), b) with signed negative b) for exponents outside the -1/-2/-3 short-circuit ladder; not covered by existing negative_base_integer_exponents (3,4,-3,-2)." }, "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": "numel=67108868 -> 16777217 vec4s, one past the 65536*256 fold boundary; verifies gid.y high-bit fold + `i >= params.count` guard admit the final vec4 (elements 67108864..67108867) in same_shape_vec4. Exponent 2 uses the cheap a*a short-circuit and a nonzero periodic base to keep host preparation compute-light while preserving final-vector coverage. Its largest tensor is 268435472 bytes, so the case needs an adapter whose maxBufferSize and maxStorageBufferBindingSize both reach it — declared, because the WebGPU guaranteed minimums (256 MiB / 128 MiB) do not, and a device at them must report the case inapplicable rather than fail allocating 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. The specialized chain only handles non-negative powers, so a negative one falls back to the f32 route and truncates; no case had ever taken that arm. Bases of +/-1 survive the reciprocal, larger magnitudes truncate to zero, so the expected output is not uniform." }, "sourceContext": { "constantScalars": { "Y": -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 } } } ] }