{ "op": "ai.onnx.Mod", "fixtureArrays": { "ort_int32_rank3_scalar_divisor_broadcast_input_a": [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] }, "cases": [ { "name": "int16_floor_mod_boundaries", "inputs": { "a": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [-32768, -32768, 32767, -32767] } }, "b": { "dtype": "int16", "shape": [4], "data": { "kind": "values", "values": [-1, 32767, -32768, -32768] } } }, "outputs": { "c": { "dtype": "int16", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0, 32766, -1, -32767] } } } }, { "name": "dispatch_cliff_broadcast", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [16776961], "data": { "kind": "cycle", "values": [5.5, 6.5, 7.5, 8.5, 9.5] } }, "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [3.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [16776961], "tolerance": 0.0001 } } }, { "name": "u32_broadcast", "inputs": { "a": { "dtype": "uint32", "shape": [2, 3], "data": { "kind": "values", "values": [5, 6, 7, 8, 9, 10] } }, "b": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 4, 5] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [2, 3] } } }, { "name": "f32_broadcast", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [5.5, 6.5, 7.5, 8.5] } }, "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4] } } }, { "name": "f32_fmod_subnormal_dividend_scalar_b_vec4", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Fmod_float_mixed_sign", "notes": "For |x| < |y|, fmod(x, y) returns x; finite subnormal dividends must not be flushed to zero." }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39, -4e-39] } }, "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39, -4e-39] } } } }, { "name": "f32_fmod_subnormal_dividend_scalar_path", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Fmod_float_mixed_sign", "notes": "Scalar broadcast companion: subnormal dividends smaller than the divisor are valid nonzero remainders." }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39] } }, "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [3], "tolerance": 0, "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39] } } } }, { "name": "f32_fmod_negative_operands", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-5.5, 5.5, -5.5, 5.5] } }, "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [2.0, 2.0, -2.0, -2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } } }, { "name": "rank0_scalar_fmod_negative_dividend", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-5.5] } }, "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } } }, { "name": "f32_fmod_large_dividend_cancellation", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [100000000000000000000.0, 10000000000000.0, -100000000000000000000.0, 100000000000000000000.0, 2500000000.0, 123456789.0] } }, "b": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [3.0, 7.0, 3.0, 7.0, 100.0, 1000.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [6], "tolerance": 0.001 } } }, { "name": "ort_f32_fmod_mixed_sign", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Fmod_float_mixed_sign" }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [-4.3, 7.2, 5.0, 4.3, -7.2, 8.0] } }, "b": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [2.1, -3.4, 8.0, -2.1, 3.4, 5.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [6], "tolerance": 0.000001 } } }, { "name": "ort_f16_fmod_mixed_sign", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Fmod_float16_mixed_sign" }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float16", "shape": [6], "data": { "kind": "values", "values": [-4.3, 7.2, 5.0, 4.3, -7.2, 8.0] } }, "b": { "dtype": "float16", "shape": [6], "data": { "kind": "values", "values": [2.1, -3.4, 8.0, -2.1, 3.4, 5.0] } } }, "outputs": { "c": { "dtype": "float16", "shape": [6], "tolerance": 0.002 } } }, { "name": "ort_uint32_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.UInt32_mod" }, "inputs": { "a": { "dtype": "uint32", "shape": [6], "data": { "kind": "values", "values": [4, 7, 5, 4, 7, 8] } }, "b": { "dtype": "uint32", "shape": [6], "data": { "kind": "values", "values": [2, 3, 8, 2, 3, 5] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [6], "tolerance": 0 } } }, { "name": "ort_int32_mixed_sign_floor_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mixed_sign" }, "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6], "tolerance": 0 } } }, { "name": "ort_int32_mixed_sign_fmod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mixed_sign_fmod" }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6], "tolerance": 0 } } }, { "name": "ort_int32_rank3_scalar_divisor_broadcast", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mod_bcast" }, "inputs": { "a": { "dtype": "int32", "shape": [3, 2, 5], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_int32_rank3_scalar_divisor_broadcast_input_a" } } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [7] } } }, "outputs": { "c": { "dtype": "int32", "shape": [3, 2, 5], "tolerance": 0, "data": { "kind": "values", "values": [0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1] } } } }, { "name": "ort_int8_mixed_sign_floor_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int8_mixed_sign" }, "inputs": { "a": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [0, -2, 5, 0, 2, 3] }, "tolerance": 0 } } }, { "name": "ort_int8_mixed_sign_fmod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int8_mixed_sign_fmod" }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [0, 1, 5, 0, -1, 3] }, "tolerance": 0 } } }, { "name": "ort_uint8_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.UInt8_mod" }, "inputs": { "a": { "dtype": "uint8", "shape": [6], "data": { "kind": "values", "values": [4, 7, 5, 4, 7, 8] } }, "b": { "dtype": "uint8", "shape": [6], "data": { "kind": "values", "values": [2, 3, 8, 2, 3, 5] } } }, "outputs": { "c": { "dtype": "uint8", "shape": [6], "data": { "kind": "values", "values": [0, 1, 5, 0, 1, 3] }, "tolerance": 0 } } }, { "name": "ort_int8_mixed_sign_floor_mod_vec4", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int8_mixed_sign", "notes": "Extended to 8 elements to exercise the vectorized WebGPU path while preserving ORT's mixed-sign floor-mod semantics." }, "inputs": { "a": { "dtype": "int8", "shape": [8], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8, -9, 9] } }, "b": { "dtype": "int8", "shape": [8], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5, 4, -4] } } }, "outputs": { "c": { "dtype": "int8", "shape": [8], "data": { "kind": "values", "values": [0, -2, 5, 0, 2, 3, 3, -3] }, "tolerance": 0 } } }, { "name": "ort_uint8_mod_vec4", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.UInt8_mod", "notes": "Extended to 8 elements to exercise the vectorized WebGPU path while preserving ORT's unsigned mod semantics." }, "inputs": { "a": { "dtype": "uint8", "shape": [8], "data": { "kind": "values", "values": [4, 7, 5, 4, 7, 8, 255, 128] } }, "b": { "dtype": "uint8", "shape": [8], "data": { "kind": "values", "values": [2, 3, 8, 2, 3, 5, 10, 127] } } }, "outputs": { "c": { "dtype": "uint8", "shape": [8], "data": { "kind": "values", "values": [0, 1, 5, 0, 1, 3, 5, 1] }, "tolerance": 0 } } }, { "name": "ort_int16_mixed_sign_floor_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int16_mixed_sign" }, "inputs": { "a": { "dtype": "int16", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int16", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int16", "shape": [6], "tolerance": 0 } } }, { "name": "ort_int16_mixed_sign_fmod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int16_mixed_sign_fmod" }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "int16", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int16", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int16", "shape": [6], "tolerance": 0 } } }, { "name": "ort_int32_scalar_divisor_broadcast", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mod_bcast" }, "inputs": { "a": { "dtype": "int32", "shape": [3, 2, 5], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_int32_rank3_scalar_divisor_broadcast_input_a" } } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [7] } } }, "outputs": { "c": { "dtype": "int32", "shape": [3, 2, 5], "tolerance": 0 } } }, { "name": "int32_large_values_no_float_cast", "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [2147483647, 2000000001, 16777217, -2147483647, -2000000001, -16777217] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [3, 97, 3, 3, 97, 3] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6], "tolerance": 0 } } }, { "name": "u32_large_values_no_float_cast", "inputs": { "a": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [4294967295, 4294967294, 4000000001, 16777217, 16777216] } }, "b": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [97, 65535, 4000000000, 3, 5] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [5], "tolerance": 0 } } }, { "name": "zero_sized_broadcast_noop", "inputs": { "a": { "dtype": "uint32", "shape": [0, 3], "data": { "kind": "values", "values": [] } }, "b": { "dtype": "uint32", "shape": [1, 3], "data": { "kind": "values", "values": [2, 3, 5] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [0, 3], "tolerance": 0 } } }, { "name": "ort_dim_zero_broadcast_loop_span", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.DimWithZeroHandling", "notes": "Int32 projection of ORT's zero-dimension Mod BroadcastLoopSpan case." }, "inputs": { "a": { "dtype": "int32", "shape": [2, 2, 0], "data": { "kind": "values", "values": [] } }, "b": { "dtype": "int32", "shape": [2, 1], "data": { "kind": "values", "values": [1, 2] } } }, "outputs": { "c": { "dtype": "int32", "shape": [2, 2, 0], "tolerance": 0 } } }, { "name": "onnx_backend_mod_broadcast", "inputs": { "a": { "dtype": "int32", "shape": [3, 2, 5], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/ort_int32_rank3_scalar_divisor_broadcast_input_a" } } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [7] } } }, "outputs": { "c": { "dtype": "int32", "shape": [3, 2, 5] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_broadcast" } }, { "name": "onnx_backend_mod_int64_fmod", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_int64_fmod", "notes": "ONNX int64 tensors use framework int32/uint32 slots where representable." } }, { "name": "onnx_backend_mod_mixed_sign_float16", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float16", "shape": [6], "data": { "kind": "values", "values": [-4.30078125, 7.19921875, 5.0, 4.30078125, -7.19921875, 8.0] } }, "b": { "dtype": "float16", "shape": [6], "data": { "kind": "values", "values": [2.099609375, -3.400390625, 8.0, -2.099609375, 3.400390625, 5.0] } } }, "outputs": { "c": { "dtype": "float16", "shape": [6] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_mixed_sign_float16" } }, { "name": "onnx_backend_mod_mixed_sign_float32", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [-4.300000190734863, 7.199999809265137, 5.0, 4.300000190734863, -7.199999809265137, 8.0] } }, "b": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [2.0999999046325684, -3.4000000953674316, 8.0, -2.0999999046325684, 3.4000000953674316, 5.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [6] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_mixed_sign_float32" } }, { "name": "onnx_backend_mod_mixed_sign_int32", "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_mixed_sign_int32" } }, { "name": "onnx_backend_mod_mixed_sign_int8", "inputs": { "a": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [-4, 7, 5, 4, -7, 8] } }, "b": { "dtype": "int8", "shape": [6], "data": { "kind": "values", "values": [2, -3, 8, -2, 3, 5] } } }, "outputs": { "c": { "dtype": "int8", "shape": [6] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_mixed_sign_int8" } }, { "name": "onnx_backend_mod_uint32", "inputs": { "a": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 7, 5] } }, "b": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 3, 8] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [3] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_uint32" } }, { "name": "onnx_backend_mod_uint8", "inputs": { "a": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [4, 7, 5] } }, "b": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [2, 3, 8] } } }, "outputs": { "c": { "dtype": "uint8", "shape": [3] } }, "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_mod_uint8" } }, { "name": "vec4_u32_same_shape", "inputs": { "a": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [4, 7, 5, 4, 7, 8, 9, 10] } }, "b": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [2, 3, 8, 3, 4, 5, 7, 6] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [8], "data": { "kind": "values", "values": [0, 1, 5, 1, 3, 3, 2, 4] }, "tolerance": 0 } } }, { "name": "i32_scalar_divisor_vec4_floor_mod", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mod_bcast", "notes": "A vec4-aligned int32 tensor with a scalar negative divisor exercises scalar-divisor broadcasting and drives floor-mod correction on dividends on both sides of zero." }, "inputs": { "a": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [-9, 7, -7, 15, 0, -1, 22, -22] } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-7] } } }, "outputs": { "c": { "dtype": "int32", "shape": [8], "tolerance": 0, "data": { "kind": "values", "values": [-2, 0, 0, -6, 0, -1, -6, -1] } } } }, { "name": "i32_scalar_divisor_vec4_fmod", "attrs": { "fmod": 1 }, "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "ModOpTest.Int32_mod_bcast", "notes": "The fmod=1 half of the same route: truncated remainder, so the sign follows the dividend and the floor-mod adjust must NOT fire. Left unpinned so the reference is exercised on the arm its pinned sibling covers only in the kernel." }, "inputs": { "a": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [-9, 7, -7, 15, 0, -1, 22, -22] } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-7] } } }, "outputs": { "c": { "dtype": "int32", "shape": [8], "tolerance": 0 } } }, { "name": "vec4_i32_floor_mod_mixed_sign", "inputs": { "a": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [-4, 7, 5, -7, 8, -9, 10, -3] } }, "b": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [3, -3, 3, 3, -5, 5, 7, -2] } } }, "outputs": { "c": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [2, -2, 2, 2, -2, 1, 3, -1] }, "tolerance": 0 } } }, { "name": "vec4_i32_fmod_mixed_sign", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [-4, 7, 5, -7, 8, -9, 10, -3] } }, "b": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [3, -3, 3, 3, -5, 5, 7, -2] } } }, "outputs": { "c": { "dtype": "int32", "shape": [8], "data": { "kind": "values", "values": [-1, 1, 2, -1, 3, -4, 3, -1] }, "tolerance": 0 } } }, { "name": "vec4_f16_fmod_mixed_sign", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float16", "shape": [8], "data": { "kind": "values", "values": [5.5, -5.5, 7.25, -7.25, 9.5, -9.5, 3.75, -3.75] } }, "b": { "dtype": "float16", "shape": [8], "data": { "kind": "values", "values": [2.0, 2.0, 3.0, 3.0, 4.0, -4.0, 1.5, 1.5] } } }, "outputs": { "c": { "dtype": "float16", "shape": [8], "data": { "kind": "values", "values": [1.5, -1.5, 1.25, -1.25, 1.5, -1.5, 0.75, -0.75] }, "tolerance": 0.001 } } }, { "name": "vec4_f32_fmod_large_dividend_cancellation", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [100000000000000000000.0, 10000000000000.0, -100000000000000000000.0, 100000000000000000000.0, 2500000000.0, 123456789.0, -10000000000000.0, 999999999.0] } }, "b": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [3.0, 7.0, 3.0, 7.0, 100.0, 1000.0, 7.0, 10.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [8], "tolerance": 0.001 } } }, { "name": "i32_floor_mod_non_vec4_numel_negative_divisor", "inputs": { "a": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [5, -5, 7] } }, "b": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [-3, -3, -3] } } }, "outputs": { "c": { "dtype": "int32", "shape": [3], "tolerance": 0 } } }, { "name": "f16_fmod_values_near_f16_max", "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [65504.0, 65504.0, -65504.0, 1024.0] } }, "b": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [3.0, 0.5, 3.0, 0.125] } } }, "outputs": { "c": { "dtype": "float16", "shape": [4], "tolerance": 0.5 } } }, { "name": "u32_scalar_b_non_vec4_large_values", "inputs": { "a": { "dtype": "uint32", "shape": [5], "data": { "kind": "values", "values": [4294967295, 4294967294, 100, 7, 3] } }, "b": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [4294967293] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [5], "tolerance": 0, "data": { "kind": "values", "values": [2, 1, 100, 7, 3] } } } }, { "name": "i8_floor_mod_divisor_equals_dividend", "inputs": { "a": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-128, -128, -1, 127] } }, "b": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-128, 127, -1, -127] } } }, "outputs": { "c": { "dtype": "int8", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0, 126, 0, 0] } } } }, { "name": "rank7_broadcast_scalar_tail", "inputs": { "a": { "dtype": "uint32", "shape": [2, 1, 2, 1, 2, 1, 3], "data": { "kind": "cycle", "values": [5, 7, 11, 13] } }, "b": { "dtype": "uint32", "shape": [1, 2, 1, 2, 1, 2, 1], "data": { "kind": "cycle", "values": [2, 3, 4] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [2, 2, 2, 2, 2, 2, 3], "tolerance": 0 } } }, { "name": "last_axis_broadcast_vec4_odd_row_crossing", "provenance": { "notes": "Four vec4 groups cross odd-width row boundaries, exercising wrapped per-lane B indices. Expected values come from the TypeScript Mod reference." }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float32", "shape": [4, 5], "data": { "kind": "fillFloat32", "sinStep": 0.41, "scale": 17.0, "offset": -2.0 } }, "b": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4, 5], "tolerance": 0.000001 } } }, { "name": "last_axis_broadcast_vec4_f16_odd_row_crossing", "provenance": { "notes": "f16 companion for the per-lane broadcast path; locks explicit widening of scalar B lanes before fmod arithmetic." }, "attrs": { "fmod": 1 }, "inputs": { "a": { "dtype": "float16", "shape": [4, 5], "data": { "kind": "fillFloat32", "sinStep": 0.41, "scale": 17.0, "offset": -2.0 } }, "b": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [2.0, 3.0, 4.0, 5.0, 6.0] } } }, "outputs": { "c": { "dtype": "float16", "shape": [4, 5], "tolerance": 0.01 } } }, { "name": "rank8_broadcast_alternating", "attrs": {}, "inputs": { "a": { "dtype": "uint32", "shape": [2, 1, 2, 1, 2, 1, 2, 3], "data": { "kind": "cycle", "values": [7, 9, 13, 20] } }, "b": { "dtype": "uint32", "shape": [1, 2, 1, 2, 1, 2, 1, 1], "data": { "kind": "cycle", "values": [3, 5] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [2, 2, 2, 2, 2, 2, 2, 3], "tolerance": 0 } } } ] }