ai.onnx.Mul / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
91de7a5 verified
Raw
History Blame
27.4 kB
{
"op": "ai.onnx.Mul",
"fixtureArrays": {
"onnx_backend_mul_input_a": [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]
},
"cases": [
{
"name": "same_shape",
"inputs": {
"a": { "dtype": "float32", "shape": [19], "data": { "kind": "fillFloat32", "sinStep": 0.13, "cosStep": 0.29 } },
"b": { "dtype": "float32", "shape": [19], "data": { "kind": "fillFloat32", "sinStep": 0.31, "cosStep": 0.07 } }
},
"outputs": { "c": { "dtype": "float32", "shape": [19], "tolerance": 0.000001 } }
},
{
"name": "f32_subnormal_times_large_scale_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; the subnormal operand/result cannot be reproduced on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul",
"notes": "Subnormal activations multiplied by a large finite scale produce normal finite values; zero-flushing loses the signal before scaling."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1e-39, -1e-39, 1e-38, -1e-38] }
},
"b": { "dtype": "float32", "shape": [4], "data": { "kind": "constant", "value": 1e+38 } }
},
"outputs": { "c": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } }
},
{
"name": "f32_subnormal_times_large_scale_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; the subnormal operand/result cannot be reproduced on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul",
"notes": "Scalar-path companion: subnormal inputs multiplied by a large finite scale should recover normal finite values."
},
"inputs": {
"a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-39, -1e-39, 1e-38] } },
"b": { "dtype": "float32", "shape": [3], "data": { "kind": "constant", "value": 1e+38 } }
},
"outputs": { "c": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "f32_normal_inputs_subnormal_product_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; the subnormal product cannot be reproduced on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_float",
"notes": "Both inputs are normal float32 values, but their products are valid subnormal outputs; the multiply path must not flush the result."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20, -2e-20] }
},
"b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-20, 1e-20, 1e-20, 1e-20] } }
},
"outputs": {
"c": {
"dtype": "float32",
"shape": [4],
"tolerance": 0,
"data": { "kind": "values", "values": [1e-40, -1e-40, 2e-40, -2e-40] }
}
}
},
{
"name": "f32_normal_inputs_subnormal_product_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; the subnormal product cannot be reproduced on GPU."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_float",
"notes": "Scalar-path companion: normal operands can produce valid signed subnormal products."
},
"inputs": {
"a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-20, -1e-20, 2e-20] } },
"b": { "dtype": "float32", "shape": [3], "data": { "kind": "constant", "value": 1e-20 } }
},
"outputs": {
"c": {
"dtype": "float32",
"shape": [3],
"tolerance": 0,
"data": { "kind": "values", "values": [1e-40, -1e-40, 2e-40] }
}
}
},
{
"name": "float16_vec4_same_shape",
"inputs": {
"a": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": [1.0, -2.0, 3.5, -4.0, 0.25, 10.0, -100.0, 0.001] }
},
"b": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": [0.5, 2.0, -1.5, 4.0, 0.75, -5.0, 100.0, -0.001] }
}
},
"outputs": { "c": { "dtype": "float16", "shape": [8], "tolerance": 0.001 } }
},
{
"name": "rank4_broadcast",
"inputs": {
"a": {
"dtype": "float32",
"shape": [2, 3, 4, 5],
"data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
},
"b": {
"dtype": "float32",
"shape": [1, 3, 1, 5],
"data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.11, "scale": 0.2 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 3, 4, 5], "tolerance": 0.000001 } }
},
{
"name": "odd_inner_lhs_broadcast_rhs_same_vec4",
"provenance": {
"notes": "Locks the symmetric cross-row vec4 route: B is same-shape/vector-bound while A wraps its broadcast row between output lanes."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [1, 5],
"data": { "kind": "values", "values": [0.5, -1.0, 1.5, -2.0, 2.5] }
},
"b": {
"dtype": "float32",
"shape": [4, 5],
"data": { "kind": "fillFloat32", "sinStep": 0.19, "cosStep": 0.07, "scale": 2.0 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [4, 5], "tolerance": 0.000001 } }
},
{
"name": "true_scalar_rhs_broadcast",
"inputs": {
"a": {
"dtype": "float32",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, -2.0, 3.0, -4.0, 5.0, -6.0] }
},
"b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-0.5] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } }
},
{
"name": "f32_broadcast_unaligned_cols_64x255",
"provenance": {
"notes": "Compact route-lock for cross-row vec4 broadcasting: the odd trailing dimension makes some output vectors wrap the repeated B row."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [64, 255],
"data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.023, "scale": 2.0 }
},
"b": {
"dtype": "float32",
"shape": [1, 255],
"data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.031, "scale": 2.0 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [64, 255], "tolerance": 0.000001 } }
},
{
"name": "rank0_scalar_scalar_output",
"inputs": {
"a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-3.0] } },
"b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.5] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
},
{
"name": "int32_exact_above_float24",
"inputs": {
"a": {
"dtype": "int32",
"shape": [4],
"data": { "kind": "values", "values": [16777217, -16777217, 8388609, 123456789] }
},
"b": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [1, -1, 3, 2] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [4] } }
},
{
"name": "ort_float_3x3",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_float"
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [1.0, 2.0, -1.0, 0.0, 1.5, -100.0, -5.0, 9.3, -10000.0] }
},
"b": {
"dtype": "float32",
"shape": [3, 3],
"data": { "kind": "values", "values": [-1.0, 4.4, 432.3, 0.0, 3.5, 64.0, -5.4, 9.0, 10000.0] }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [3, 3], "tolerance": 0.00001 } }
},
{
"name": "ort_int8_vector",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_int8"
},
"inputs": {
"a": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"b": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [4, -3, 6] } }
},
"outputs": { "c": { "dtype": "int8", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_int8_overflow_wrap",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_int8",
"notes": "Extends ORT's int8 Mul coverage with signed overflow values that must wrap to logical int8 width."
},
"inputs": {
"a": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [64, -64, 50] } },
"b": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [2, 2, 3] } }
},
"outputs": { "c": { "dtype": "int8", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_int32_vector",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_int32"
},
"inputs": {
"a": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"b": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, -3, 6] } }
},
"outputs": { "c": { "dtype": "int32", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_uint8_vector",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_uint8"
},
"inputs": {
"a": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"b": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [4, 3, 6] } }
},
"outputs": { "c": { "dtype": "uint8", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_uint8_overflow_wrap",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_uint8",
"notes": "Extends ORT's uint8 Mul coverage with overflow values that must wrap to logical uint8 width."
},
"inputs": {
"a": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [128, 64, 50] } },
"b": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [2, 4, 6] } }
},
"outputs": { "c": { "dtype": "uint8", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_uint32_vector",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_uint32"
},
"inputs": {
"a": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 3] } },
"b": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 3, 6] } }
},
"outputs": { "c": { "dtype": "uint32", "shape": [3], "tolerance": 0 } }
},
{
"name": "ort_float16_3x3_projection",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_float",
"notes": "Float16 projection of the ORT float Mul case, including an overflowing product."
},
"inputs": {
"a": {
"dtype": "float16",
"shape": [3, 3],
"data": { "kind": "values", "values": [1.0, 2.0, -1.0, 0.0, 1.5, -100.0, -5.0, 9.3, -10000.0] }
},
"b": {
"dtype": "float16",
"shape": [3, 3],
"data": { "kind": "values", "values": [-1.0, 4.4, 432.3, 0.0, 3.5, 64.0, -5.4, 9.0, 10000.0] }
}
},
"outputs": { "c": { "dtype": "float16", "shape": [3, 3], "relTolerance": 0.002 } }
},
{
"name": "onnx_backend_mul_bcast",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul_bcast" },
"inputs": {
"a": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_mul_input_a" } }
},
"b": {
"dtype": "float32",
"shape": [5],
"data": {
"kind": "values",
"values": [-0.6724604368209839, -0.35955315828323364, -0.8131462931632996, -1.7262825965881348, 0.17742614448070526]
}
}
},
"outputs": { "c": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0 } }
},
{
"name": "onnx_backend_mul_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul_example" },
"inputs": {
"a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"b": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [4.0, 5.0, 6.0] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [3], "tolerance": 0 } }
},
{
"name": "onnx_backend_mul",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul", "test": "test_mul" },
"inputs": {
"a": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_mul_input_a" } }
},
"b": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [-0.6724604368209839, -0.35955315828323364, -0.8131462931632996, -1.7262825965881348, 0.17742614448070526, -0.4017809331417084, -1.630198359489441, 0.46278226375579834, -0.9072983860969543, 0.05194539576768875, 0.7290905714035034, 0.12898291647434235, 1.1394007205963135, -1.234825849533081, 0.4023416340351105, -0.6848101019859314, -0.8707971572875977, -0.5788496732711792, -0.3115525245666504, 0.056165341287851334, -1.1651498079299927, 0.9008265137672424, 0.4656624495983124, -1.5362436771392822, 1.4882521629333496, 1.895889163017273, 1.1787796020507812, -0.1799248307943344, -1.0707526206970215, 1.0544517040252686, -0.4031769335269928, 1.222445011138916, 0.2082749754190445, 0.9766390323638916, 0.3563663959503174, 0.7065731883049011, 0.01050002034753561, 1.7858705520629883, 0.12691208720207214, 0.4019893705844879, 1.8831506967544556, -1.3477590084075928, -1.2704850435256958, 0.969396710395813, -1.1731233596801758, 1.9436211585998535, -0.4136189818382263, -0.747454822063446, 1.922942042350769, 1.4805147647857666, 1.8675589561462402, 0.9060446619987488, -0.8612256646156311, 1.910064935684204, -0.26800337433815, 0.8024563789367676, 0.9472519755363464, -0.15501008927822113, 0.6140793561935425, 0.922206699848175]
}
}
},
"outputs": { "c": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_mul_int8",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul_int8",
"test": "test_mul_int8"
},
"inputs": {
"a": {
"dtype": "int8",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [0, 0, 0, 1, 3, 0, 1, 1, 0, 2, 3, 3, 0, 0, 1, 2, 2, 0, 0, 2, 2, 2, 0, 0, 3, 3, 0, 3, 1, 1, 0, 3, 1, 2, 2, 2, 0, 2, 2, 3, 3, 2, 1, 2, 0, 1, 1, 1, 2, 3, 1, 1, 3, 2, 0, 2, 3, 3, 1, 1]
}
},
"b": {
"dtype": "int8",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [4, 22, 10, 23, 10, 18, 21, 3, 15, 7, 19, 17, 23, 14, 4, 12, 20, 20, 12, 14, 21, 11, 17, 9, 22, 16, 17, 3, 21, 3, 3, 10, 8, 7, 3, 1, 8, 9, 13, 20, 17, 9, 8, 10, 9, 17, 10, 18, 23, 15, 3, 20, 14, 15, 10, 11, 2, 18, 23, 19]
}
}
},
"outputs": { "c": { "dtype": "int8", "shape": [3, 4, 5], "tolerance": 0 } }
},
{
"name": "onnx_backend_mul_uint8",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul_uint8",
"test": "test_mul_uint8"
},
"inputs": {
"a": {
"dtype": "uint8",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [1, 2, 2, 0, 2, 2, 1, 3, 3, 3, 1, 1, 2, 1, 3, 2, 0, 3, 1, 1, 3, 0, 0, 0, 3, 0, 2, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 0, 1, 2, 2, 0, 3, 2, 1, 1, 3, 1, 1, 0, 3, 2, 1, 3, 0, 1, 2, 1, 1, 2]
}
},
"b": {
"dtype": "uint8",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [0, 5, 20, 23, 21, 13, 9, 1, 9, 14, 7, 11, 12, 5, 17, 0, 22, 22, 9, 6, 23, 16, 0, 15, 6, 23, 22, 20, 9, 16, 4, 11, 8, 10, 9, 3, 4, 0, 0, 3, 2, 9, 5, 14, 20, 5, 2, 20, 15, 1, 3, 4, 12, 17, 19, 5, 8, 7, 8, 16]
}
}
},
"outputs": { "c": { "dtype": "uint8", "shape": [3, 4, 5], "tolerance": 0 } }
},
{
"name": "onnx_backend_mul_uint32",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_mul_uint32",
"test": "test_mul_uint32"
},
"inputs": {
"a": {
"dtype": "uint32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [1, 3, 1, 2, 2, 1, 0, 2, 3, 0, 2, 0, 3, 2, 1, 2, 1, 0, 1, 1, 2, 2, 3, 0, 1, 0, 3, 0, 0, 2, 0, 3, 1, 0, 3, 2, 1, 3, 0, 1, 2, 0, 0, 0, 2, 1, 3, 0, 0, 0, 0, 1, 3, 2, 2, 1, 0, 1, 1, 1]
}
},
"b": {
"dtype": "uint32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [23, 1, 19, 21, 23, 19, 22, 22, 7, 9, 17, 9, 22, 0, 19, 4, 17, 20, 21, 16, 3, 10, 1, 20, 4, 4, 16, 16, 15, 10, 13, 8, 11, 20, 6, 9, 15, 3, 19, 12, 18, 17, 10, 2, 1, 11, 3, 12, 4, 1, 17, 0, 7, 4, 3, 5, 6, 3, 2, 8]
}
}
},
"outputs": { "c": { "dtype": "uint32", "shape": [3, 4, 5], "tolerance": 0 } }
},
{
"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": {
"a": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [1.0, 2.0, 3.0] } },
"b": { "dtype": "float32", "shape": [3, 0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [3, 0], "tolerance": 0 } }
},
{
"name": "ort_dim_zero_smaller_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": {
"a": { "dtype": "float32", "shape": [2, 1, 2], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0] } },
"b": { "dtype": "float32", "shape": [0, 2], "data": { "kind": "values", "values": [] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 0, 2], "tolerance": 0 } }
},
{
"name": "ort_dim_zero_larger_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": {
"a": { "dtype": "float32", "shape": [0, 2, 2], "data": { "kind": "values", "values": [] } },
"b": { "dtype": "float32", "shape": [1, 2], "data": { "kind": "values", "values": [1.0, 2.0] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [0, 2, 2], "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": {
"a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [1.0] } },
"b": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } }
},
"outputs": { "c": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "ort_int16_basic_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "The widened-i32 Mul path does not yet restore signed 16-bit wraparound after overflow; enable int16 only with explicit narrowing and overflow fixtures."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Mul_int16"
},
"inputs": {
"a": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [3, 6, -3] } },
"b": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [4, -3, -2] } }
},
"outputs": { "c": { "dtype": "int16", "shape": [3], "tolerance": 0 } }
},
{
"name": "rank5_broadcast_vec4",
"provenance": {
"notes": "Exercises the untested rank-5 broadcast path. Output last dim 8 (%4==0) and numel 960 (%4==0) select broadcast_vec4 (priority 10) at rank 5, which existing rank 0-4 cases never reach."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [2, 3, 4, 5, 8],
"data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19 }
},
"b": {
"dtype": "float32",
"shape": [1, 3, 1, 5, 8],
"data": { "kind": "fillFloat32", "sinStep": 0.29, "cosStep": 0.11, "scale": 0.2 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 3, 4, 5, 8], "tolerance": 0.000001 } }
},
{
"name": "rank6_scalar_broadcast",
"provenance": {
"notes": "Exercises the untested rank-6 scalar broadcast fallback. Output last dim 3 (not %4) fails broadcast_vec4's dim(C,rank-1)%4 clause, dropping to the scalar broadcast variant (ranks.C==6, the cap). No existing case reaches rank 5/6."
},
"inputs": {
"a": {
"dtype": "float32",
"shape": [2, 2, 3, 4, 5, 3],
"data": { "kind": "fillFloat32", "sinStep": 0.11, "cosStep": 0.23 }
},
"b": {
"dtype": "float32",
"shape": [1, 2, 1, 4, 1, 3],
"data": { "kind": "fillFloat32", "sinStep": 0.17, "cosStep": 0.05, "scale": 0.3 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 2, 3, 4, 5, 3], "tolerance": 0.000001 } }
},
{
"name": "rank7_odd_lastdim_no_variant_match",
"inputs": {
"a": {
"dtype": "float32",
"shape": [2, 1, 3, 1, 2, 1, 3],
"data": { "kind": "fillFloat32", "sinStep": 0.05, "cosStep": 0.17 }
},
"b": {
"dtype": "float32",
"shape": [1, 4, 1, 5, 1, 3, 1],
"data": { "kind": "fillFloat32", "sinStep": 0.23, "cosStep": 0.11, "scale": 0.4 }
}
},
"outputs": { "c": { "dtype": "float32", "shape": [2, 4, 3, 5, 2, 3, 3], "tolerance": 0.000001 } }
},
{
"name": "f16_broadcast_vec4_overflow_to_inf",
"inputs": {
"a": {
"dtype": "float16",
"shape": [2, 8],
"data": {
"kind": "values",
"values": [300.0, -300.0, 256.0, 1.0, 200.0, -200.0, 255.0, 100.0, 0.5, 1.0, -1.0, 32768.0, 0.0, 150.0, -400.0, 400.0]
}
},
"b": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": [300.0, 300.0, 256.0, 0.0, 400.0, 400.0, 257.0, 657.0] }
}
},
"outputs": { "c": { "dtype": "float16", "shape": [2, 8], "allowNaN": false, "tolerance": 0 } }
},
{
"name": "int8_overflow_wrap_broadcast_vec4_path",
"inputs": {
"a": {
"dtype": "int8",
"shape": [2, 8],
"data": {
"kind": "values",
"values": [64, -64, 50, 127, -128, 100, 32, -32, 63, -63, 51, -127, 1, -1, 33, -33]
}
},
"b": { "dtype": "int8", "shape": [1, 8], "data": { "kind": "values", "values": [2, 2, 3, 1, -1, 2, 4, 4] } }
},
"outputs": { "c": { "dtype": "int8", "shape": [2, 8], "tolerance": 0 } }
}
]
}