| { |
| "fixtureArrays": { |
| "onnx_backend_bcast_int32_rank3_input_a": [17, 4, 9, 22, 18, -9, 9, -1, -1, 4, 1, 14, 7, 1, 4, 3, 14, -2, 3, -8, -25, 6, 8, -7, 22, -14, 0, -1, 15, 14, 1, 3, -8, -19, -3, 1, 12, 12, -3, -3, -10, -14, -17, 19, -5, -4, -12, 7, -16, -2, -8, 3, -5, -11, 0, 4, 0, 3, -6, -3], |
| "broadcast_vec4_lhs_splat_lower_rank_input_b": [9, 10, 11, 10, 19, 20, 21, 20, 29, 30, 31, 30, 30, 20, 10, 0, 10, 20, 30, 40, 31, 29, 30, 10], |
| "scalarOperandRouteValues": [0.5, -1, 2, 0.25, 3, -2, 0.25, 1, 0.75, 0.25, -0.5, 4, 0.125, 0.25, -3, 2.5] |
| }, |
| "cases": [ |
| { |
| "name": "f32_subnormal_not_equal_zero_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 a subnormal compares equal to 0 on GPU; cannot reproduce the not-equal result." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal", |
| "notes": "Signed subnormal values are not equal to zero; flushing them to zero flips equality results." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [5], |
| "data": { "kind": "values", "values": [-1e-39, -1e-40, 0.0, 1e-40, 1e-39] } |
| }, |
| "b": { "dtype": "float32", "shape": [5], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [5], "tolerance": 0 } } |
| }, |
| { |
| "name": "same_shape", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0] } }, |
| "b": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [1.0, 0.0, 3.0, 9.0, 5.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [5] } } |
| }, |
| { |
| "name": "ort_int16_same_shape", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_int16" |
| }, |
| "inputs": { |
| "a": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [1, 0, -1, -1] } }, |
| "b": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [1, 1, 2, -1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "f32_subnormal_not_equal_zero_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 a subnormal compares equal to 0 on GPU; cannot reproduce the not-equal result." |
| }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal", |
| "notes": "On an unaligned scalar path, signed subnormal values must compare unequal to zero." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }, |
| "b": { "dtype": "float32", "shape": [3], "data": { "kind": "constant", "value": 0.0 } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast", |
| "inputs": { |
| "a": { |
| "dtype": "float16", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 1.0, 0.0, 3.0, 5.0] } |
| }, |
| "b": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 6.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 4] } } |
| }, |
| { |
| "name": "true_scalar_rhs_broadcast", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": [2.0, 1.0, 2.0, -2.0, 2.0, 0.0] } |
| }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank0_scalar_scalar_output", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_bool" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [0, 1, 0, 1] } }, |
| "b": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [0, 0, 1, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_scalar_lhs", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_bool_scalar0" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } }, |
| "b": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [0, 0, 1, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_scalar_rhs", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_bool_scalar1" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [0, 0, 1, 1] } }, |
| "b": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "int32_exact_above_float24", |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [4], |
| "data": { "kind": "values", "values": [16777216, 16777217, -16777216, -16777217] } |
| }, |
| "b": { |
| "dtype": "int32", |
| "shape": [4], |
| "data": { "kind": "values", "values": [16777217, 16777216, -16777217, -16777217] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int8_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_int8" |
| }, |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [1, 0, -1, -1] } }, |
| "b": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [1, 1, 2, -1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_float" |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 0.0, -1.0, -1.0] } }, |
| "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.0, 2.0, -1.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float16_vector_opset19", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_19_float16" |
| }, |
| "inputs": { |
| "a": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [1.0, 0.0, -1.0, -1.0] } }, |
| "b": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [1.0, 1.0, 2.0, -1.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_uint8_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_uint8" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 0, 1, 1] } }, |
| "b": { "dtype": "uint8", "shape": [4], "data": { "kind": "values", "values": [1, 1, 2, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_int32" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [1, 0, -1, -1] } }, |
| "b": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [1, 1, 2, -1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_uint32_vector", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_uint32" |
| }, |
| "inputs": { |
| "a": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [1, 0, 1, 1] } }, |
| "b": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [1, 1, 2, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "nan_and_signed_zero", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [5], |
| "data": { "kind": "values", "values": ["NaN", "NaN", 0.0, "Infinity", "-Infinity"] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [5], |
| "data": { "kind": "values", "values": ["NaN", 1.0, 0.0, "Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [5], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_broadcast_ab", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_broadcastAB" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [4, 2], "data": { "kind": "values", "values": [1, 0, -1, -1, 1, 1, -1, 0] } }, |
| "b": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [1, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_broadcast_ba", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_broadcastBA" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [1, 1] } }, |
| "b": { "dtype": "int32", "shape": [4, 2], "data": { "kind": "values", "values": [1, 0, -1, -1, 1, 1, -1, 0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_multidirectional_broadcast_ab", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_multidirectional_broadcastAB" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [1, 0, -1, -1] } }, |
| "b": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [1, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_int32_multidirectional_broadcast_ba", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_multidirectional_broadcastBA" |
| }, |
| "inputs": { |
| "a": { "dtype": "int32", "shape": [2], "data": { "kind": "values", "values": [1, 1] } }, |
| "b": { "dtype": "int32", "shape": [4, 1], "data": { "kind": "values", "values": [1, 0, -1, -1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4, 2], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_bcast_int32_rank3", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_equal_bcast", |
| "test": "test_equal_bcast" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [3, 4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_bcast_int32_rank3_input_a" } } |
| }, |
| "b": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [-6, -3, -8, -17, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_equal", |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_equal", "test": "test_equal" }, |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [3, 4, 5], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_bcast_int32_rank3_input_a" } } |
| }, |
| "b": { |
| "dtype": "int32", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [-6, -3, -8, -17, 1, -4, -16, 4, -9, 0, 7, 1, 11, -12, 4, -6, -8, -5, -3, 0, -11, 9, 4, -15, 14, 18, 11, -1, -10, 10, -4, 12, 2, 9, 3, 7, 0, 17, 1, 4, 18, -13, -12, 9, -11, 19, -4, -7, 19, 14, 18, 9, -8, 19, -2, 8, 9, -1, 6, 9] |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_equal_int8", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_equal_int8", |
| "test": "test_equal_int8" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "int8", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [3, -10, 2, 13, -6, -1, -4, 18, 6, 4, -7, 5, -6, 0, -6, 6, 5, -2, 3, -10, -14, 4, 1, 6, 23, 9, -9, 11, -13, -4, 0, 17, -7, -8, 0, -6, 11, -10, -11, -4, -4, 19, 9, 0, -12, 8, -10, -15, 11, 3, 9, 3, 8, -6, -10, 6, -8, -6, -4, 0] |
| } |
| }, |
| "b": { |
| "dtype": "int8", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [-3, -13, -6, -22, 6, -16, -11, 0, -7, 15, -12, 2, 0, -11, 5, -1, 7, 8, 21, 13, -3, -2, 10, 6, 6, -16, 0, -7, 2, 0, 9, 3, 7, -4, -9, -4, 0, 3, 22, 0, -9, -3, -4, 4, -15, 0, 1, 2, -5, -2, -14, -4, -5, 4, -11, 7, 14, -20, 4, 6] |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_equal_uint8", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_equal_uint8", |
| "test": "test_equal_uint8" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "uint8", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [13, 0, 18, 7, 12, 14, 19, 8, 13, 17, 17, 10, 22, 19, 7, 12, 13, 2, 11, 12, 17, 13, 6, 14, 15, 7, 5, 21, 17, 16, 3, 18, 9, 10, 0, 18, 0, 20, 13, 6, 10, 23, 19, 1, 13, 6, 23, 23, 12, 23, 20, 14, 1, 1, 16, 12, 17, 10, 20, 21] |
| } |
| }, |
| "b": { |
| "dtype": "uint8", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [18, 21, 10, 19, 0, 5, 21, 5, 4, 18, 23, 11, 20, 12, 20, 10, 16, 2, 12, 2, 23, 0, 7, 6, 6, 16, 18, 9, 3, 0, 10, 2, 18, 18, 20, 13, 1, 12, 0, 9, 22, 7, 19, 21, 1, 21, 3, 19, 21, 4, 2, 5, 16, 11, 18, 4, 4, 1, 23, 9] |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_equal_uint32", |
| "provenance": { |
| "source": "cmake/external/onnx/onnx/backend/test/data/node/test_equal_uint32", |
| "test": "test_equal_uint32" |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "uint32", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [19, 2, 12, 9, 19, 8, 5, 20, 21, 11, 1, 11, 15, 12, 15, 12, 21, 18, 13, 12, 9, 21, 6, 4, 16, 8, 5, 15, 5, 5, 17, 0, 16, 16, 0, 10, 12, 0, 7, 22, 19, 5, 4, 19, 4, 5, 12, 17, 19, 12, 6, 7, 20, 16, 0, 23, 15, 10, 3, 3] |
| } |
| }, |
| "b": { |
| "dtype": "uint32", |
| "shape": [3, 4, 5], |
| "data": { |
| "kind": "values", |
| "values": [16, 16, 9, 20, 20, 5, 16, 17, 21, 9, 12, 15, 6, 14, 1, 4, 16, 4, 7, 23, 14, 7, 22, 2, 22, 16, 15, 15, 18, 11, 23, 14, 7, 2, 22, 17, 3, 7, 13, 16, 5, 4, 21, 13, 5, 19, 11, 8, 0, 17, 5, 4, 1, 5, 16, 6, 8, 22, 19, 4] |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 4, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_exact_bool_inputs", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_bool" |
| }, |
| "inputs": { |
| "a": { "dtype": "bool", "shape": [4], "data": { "kind": "values", "values": [0, 1, 0, 1] } }, |
| "b": { "dtype": "bool", "shape": [4], "data": { "kind": "values", "values": [0, 0, 1, 1] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [4], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_multidirectional_broadcast_ab", |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", |
| "test": "MathOpTest.Equal_multidirectional_broadcastAB_bool", |
| "notes": "Direct bool broadcast Equal coverage from ORT." |
| }, |
| "inputs": { |
| "a": { "dtype": "bool", "shape": [4, 1], "data": { "kind": "values", "values": [1, 0, 0, 0] } }, |
| "b": { "dtype": "bool", "shape": [2], "data": { "kind": "values", "values": [1, 1] } } |
| }, |
| "outputs": { |
| "c": { |
| "dtype": "bool", |
| "shape": [4, 2], |
| "data": { "kind": "values", "values": [1, 1, 0, 0, 0, 0, 0, 0] }, |
| "tolerance": 0 |
| } |
| } |
| }, |
| { |
| "name": "empty_input_zero_dim", |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } }, |
| "b": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [0], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast_vec4_inner4_gpu", |
| "provenance": { |
| "source": "synthetic", |
| "test": "broadcast_vec4 inner-dim %4==0 coverage", |
| "notes": "Broadcasts A=[2,1,4] and B to C with innermost extent four. Exercises vec4 broadcast indexing and verifies that the grid-stride count is expressed in vec4 groups (numel(C)/4), including bounds-safe iteration across six groups." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 1, 4], |
| "data": { "kind": "values", "values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": [0.0, 2.0, 4.0, 4.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 4.0, 7.0, 6.0, 9.0, 9.0, 9.0, 9.0, 9.0] |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 3, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "int8_extremes_equal", |
| "inputs": { |
| "a": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-128, -128, 127, 127, -128, 0] } }, |
| "b": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-128, 127, 127, -128, 0, -128] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast_scalar_path_odd_inner_dim", |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [3, 5], |
| "data": { "kind": "values", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] } |
| }, |
| "b": { "dtype": "int32", "shape": [5], "data": { "kind": "values", "values": [3, 7, 3, 9, 5] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [3, 5], "tolerance": 0 } } |
| }, |
| { |
| "name": "f32_scalar_rhs_broadcast_vec4_1024", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [1024], |
| "data": { "kind": "cycle", "values": [2.0, 1.0, 2.0, -2.0, 2.0, 0.0, 3.0, 2.0] } |
| }, |
| "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [1024], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank6_broadcast_max_rank", |
| "inputs": { |
| "a": { |
| "dtype": "int32", |
| "shape": [2, 1, 2, 1, 2, 4], |
| "data": { |
| "kind": "values", |
| "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31] |
| } |
| }, |
| "b": { |
| "dtype": "int32", |
| "shape": [2, 2, 1, 4], |
| "data": { "kind": "values", "values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 1, 2, 2, 2, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank7_broadcast_scalar_tail", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 1, 2, 1, 3], |
| "data": { "kind": "cycle", "values": [0.5, -1.5, 2.25, -1.5] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2, 1, 2, 1], |
| "data": { "kind": "cycle", "values": [0.5, 2.25, -1.5] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 2, 2, 2, 2, 2, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "rank8_broadcast_alternating", |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 1, 2, 1, 2, 1, 2, 3], |
| "data": { "kind": "cycle", "values": [1.0, 2.0, 3.0, 4.0] } |
| }, |
| "b": { |
| "dtype": "float32", |
| "shape": [1, 2, 1, 2, 1, 2, 1, 1], |
| "data": { "kind": "cycle", "values": [1.0, 3.0] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 2, 2, 2, 2, 2, 2, 3], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast_vec4_lhs_splat_lower_rank", |
| "provenance": { |
| "source": "constructed fixture", |
| "test": "compare-broadcast-vec4 lhs splat arm", |
| "notes": "A has rank 2 against a rank-3 output and an innermost dimension of 1, so each A row is splatted across one output row. Distinct values in every A row and B position make an incorrect broadcast offset observable." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/broadcast_vec4_lhs_splat_lower_rank_input_b" } |
| } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 3, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast_vec4_rhs_splat_lower_rank", |
| "provenance": { |
| "source": "constructed fixture", |
| "test": "compare-broadcast-vec4 rhs splat arm", |
| "notes": "B is rank 2 with innermost axis 1 against a rank-3 output, so each vec4 output group broadcasts one B value while A remains contiguous. This mirrors the corresponding left-hand splat case." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 3, 4], |
| "data": { |
| "kind": "values", |
| "values": { "$ref": "#/fixtureArrays/broadcast_vec4_lhs_splat_lower_rank_input_b" } |
| } |
| }, |
| "b": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [10.0, 20.0, 30.0] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 3, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "broadcast_vec4_true_scalar_lhs", |
| "provenance": { |
| "source": "constructed fixture", |
| "test": "compare-broadcast-vec4 rank-0 lhs arm", |
| "notes": "A is a rank-0 scalar that broadcasts to every output position. An innermost dimension of four and eight total outputs exercise vectorized comparison, while distinct B values make scalar-A indexing observable." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [20.0] } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 4], |
| "data": { "kind": "values", "values": [10.0, 20.0, 30.0, 20.0, -5.0, 20.0, 25.0, 0.0] } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 4], "tolerance": 0 } } |
| }, |
| { |
| "name": "scalar_b_vec4_route", |
| "provenance": { |
| "notes": "Route lock for the one-element-operand vec4 kernel: the other operand matches the output and the vector count is a multiple of four, so the scalar reads once and splats. Values straddle and hit the scalar exactly, so the compare emits both results." |
| }, |
| "inputs": { |
| "a": { |
| "dtype": "float32", |
| "shape": [2, 8], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scalarOperandRouteValues" } } |
| }, |
| "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 8], "tolerance": 0 } } |
| }, |
| { |
| "name": "scalar_a_vec4_route", |
| "provenance": { |
| "notes": "Route lock for the one-element-operand vec4 kernel: the other operand matches the output and the vector count is a multiple of four, so the scalar reads once and splats. Values straddle and hit the scalar exactly, so the compare emits both results." |
| }, |
| "inputs": { |
| "a": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.25] } }, |
| "b": { |
| "dtype": "float32", |
| "shape": [2, 8], |
| "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/scalarOperandRouteValues" } } |
| } |
| }, |
| "outputs": { "c": { "dtype": "bool", "shape": [2, 8], "tolerance": 0 } } |
| } |
| ] |
| } |
|
|