{ "op": "ai.onnx.Div", "fixtureArrays": { "onnx_backend_div_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, "scale": 0.2 } }, "b": { "dtype": "float32", "shape": [19], "data": { "kind": "constant", "value": 2.5 } } }, "outputs": { "c": { "dtype": "float32", "shape": [19], "tolerance": 0.000001 } } }, { "name": "exact_integer_quotient_precision_regression", "inputs": { "a": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [165.0, -165.0, 1000.0, -1000.0, 0.0, 81.0] } }, "b": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [15.0, 15.0, 10.0, -10.0, 7.0, -9.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [6], "tolerance": 0 } } }, { "name": "f32_subnormal_ratio_finite_values_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.Div", "notes": "Equal subnormal numerator/denominator magnitudes divide to ordinary finite values; flushing inputs to zero creates NaN or infinities." }, "inputs": { "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-38, -1e-38, 4e-39, -4e-39] } }, "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-38, 1e-38, 4e-39, 4e-39] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4], "tolerance": 0 } } }, { "name": "f32_subnormal_ratio_finite_values_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.Div", "notes": "Scalar-path companion: equal subnormal magnitudes divide to ordinary finite values." }, "inputs": { "a": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-38, -1e-38, 4e-39] } }, "b": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-38, 1e-38, 4e-39] } } }, "outputs": { "c": { "dtype": "float32", "shape": [3], "tolerance": 0 } } }, { "name": "same_shape_vec4_exact_integer_quotient", "inputs": { "a": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [165.0, -165.0, 1000.0, -1000.0, 0.0, 81.0, 58720216.0, -58720216.0] } }, "b": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [15.0, 15.0, 10.0, -10.0, 7.0, -9.0, 7.0, 7.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [8], "tolerance": 0 } } }, { "name": "rank4_broadcast", "inputs": { "a": { "dtype": "float32", "shape": [2, 3, 4, 5], "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.19, "scale": 0.3 } }, "b": { "dtype": "float32", "shape": [1, 3, 1, 5], "data": { "kind": "constant", "value": 1.75 } } }, "outputs": { "c": { "dtype": "float32", "shape": [2, 3, 4, 5], "tolerance": 0.000001 } } }, { "name": "rank0_rhs_scalar_broadcast", "inputs": { "a": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [6.0, -9.0, 0.0, 12.0] } }, "b": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [3.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } } }, { "name": "large_magnitude_false_integer_snap", "inputs": { "a": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [58720216.0] } }, "b": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [7.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [1], "tolerance": 0.000001 } } }, { "name": "division_by_zero_inf_nan", "inputs": { "a": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [1.0, 0.0, -1.0, 4.0, 0.0, -3.0] } }, "b": { "dtype": "float32", "shape": [6], "data": { "kind": "values", "values": [0.0, 0.0, 0.0, "Infinity", 2.0, 0.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [6], "tolerance": 0.000001, "allowNaN": true } } }, { "name": "int32_trunc_exact_above_float24", "inputs": { "a": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [16777217, -16777217, 1000000001, -1000000001, 123456789, -123456789] } }, "b": { "dtype": "int32", "shape": [6], "data": { "kind": "values", "values": [1, 1, 3, 3, -10, -10] } } }, "outputs": { "c": { "dtype": "int32", "shape": [6] } } }, { "name": "ort_float_2x3", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_float" }, "inputs": { "a": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1000.0, 1.0, 6.0, 0.0, -10.0, -1.0] } }, "b": { "dtype": "float32", "shape": [2, 3], "data": { "kind": "values", "values": [1000.0, 2.0, 3.0, 1.0, -1.0, 4.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [2, 3], "tolerance": 0.000001 } } }, { "name": "ort_int8_truncates_toward_zero", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_int8" }, "inputs": { "a": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [4, 8, 8] } }, "b": { "dtype": "int8", "shape": [3], "data": { "kind": "values", "values": [1, -3, 2] } } }, "outputs": { "c": { "dtype": "int8", "shape": [3], "tolerance": 0 } } }, { "name": "ort_int8_min_div_negative_one", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_int8", "notes": "Extends ORT's int8 Div coverage with INT8_MIN / -1, whose mathematical quotient is not representable in int8 storage." }, "inputs": { "a": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-128, -127, 127, 7] } }, "b": { "dtype": "int8", "shape": [4], "data": { "kind": "values", "values": [-1, -1, -1, 2] } } }, "outputs": { "c": { "dtype": "int8", "shape": [4], "tolerance": 0 } } }, { "name": "ort_int32_truncates_toward_zero", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_int32" }, "inputs": { "a": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [4, 8, 8] } }, "b": { "dtype": "int32", "shape": [3], "data": { "kind": "values", "values": [1, 3, 2] } } }, "outputs": { "c": { "dtype": "int32", "shape": [3], "tolerance": 0 } } }, { "name": "ort_uint8_integer_division", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_uint8" }, "inputs": { "a": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [4, 8, 8] } }, "b": { "dtype": "uint8", "shape": [3], "data": { "kind": "values", "values": [1, 3, 2] } } }, "outputs": { "c": { "dtype": "uint8", "shape": [3], "tolerance": 0 } } }, { "name": "ort_uint32_integer_division", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_uint32" }, "inputs": { "a": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [4, 8, 8] } }, "b": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 3, 2] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [3], "tolerance": 0 } } }, { "name": "ort_float16_2x3_projection", "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_float", "notes": "Float16 projection of the ORT float Div case." }, "inputs": { "a": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "values", "values": [1000.0, 1.0, 6.0, 0.0, -10.0, -1.0] } }, "b": { "dtype": "float16", "shape": [2, 3], "data": { "kind": "values", "values": [1000.0, 2.0, 3.0, 1.0, -1.0, 4.0] } } }, "outputs": { "c": { "dtype": "float16", "shape": [2, 3], "tolerance": 0.002 } } }, { "name": "onnx_backend_div_bcast", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_bcast" }, "inputs": { "a": { "dtype": "float32", "shape": [3, 4, 5], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_div_input_a" } } }, "b": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [1.296140193939209, 1.118727684020996, 1.3179831504821777, 1.4142630100250244, 1.0641474723815918] } } }, "outputs": { "c": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.00001 } } }, { "name": "onnx_backend_div_example", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_example" }, "inputs": { "a": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [3.0, 4.0] } }, "b": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [2], "tolerance": 0.00001 } } }, { "name": "onnx_backend_div_int32_trunc", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_int32_trunc" }, "inputs": { "a": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [-3, 3, -3, 3] } }, "b": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [2, 2, -2, -2] } } }, "outputs": { "c": { "dtype": "int32", "shape": [4], "tolerance": 0.00001 } } }, { "name": "onnx_backend_div", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div" }, "inputs": { "a": { "dtype": "float32", "shape": [3, 4, 5], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/onnx_backend_div_input_a" } } }, "b": { "dtype": "float32", "shape": [3, 4, 5], "data": { "kind": "values", "values": [1.296140193939209, 1.118727684020996, 1.3179831504821777, 1.4142630100250244, 1.0641474723815918, 1.6924721002578735, 1.5666015148162842, 1.2653894424438477, 1.5232480764389038, 1.0939404964447021, 1.575946569442749, 1.9292962551116943, 1.3185689449310303, 1.6674103736877441, 1.1317979097366333, 1.71632719039917, 1.2894060611724854, 1.1831912994384766, 1.5865129232406616, 1.0201075077056885, 1.8289400339126587, 1.0046955347061157, 1.6778165102005005, 1.2700079679489136, 1.7351939678192139, 1.962188482284546, 1.2487531900405884, 1.5761573314666748, 1.5920419692993164, 1.5722519159317017, 1.2230815887451172, 1.9527490139007568, 1.4471254348754883, 1.8464086055755615, 1.699479341506958, 1.2974369525909424, 1.8137978315353394, 1.3965057134628296, 1.881103277206421, 1.581272840499878, 1.8817353248596191, 1.6925315856933594, 1.7252542972564697, 1.5013244152069092, 1.9560836553573608, 1.6439902782440186, 1.4238550662994385, 1.6063932180404663, 1.019193172454834, 1.3015748262405396, 1.6601735353469849, 1.290077567100525, 1.6180154085159302, 1.4287686347961426, 1.1354740858078003, 1.2982823848724365, 1.56996488571167, 1.5908727645874023, 1.5743253231048584, 1.6532008647918701] } } }, "outputs": { "c": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.0001 } } }, { "name": "onnx_backend_div_int8", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_int8" }, "inputs": { "a": { "dtype": "int8", "shape": [3, 4, 5], "data": { "kind": "values", "values": [16, 6, 0, 12, 18, 3, 16, 17, 14, 18, 11, 4, 15, 19, 4, 5, 3, 9, 4, 10, 8, 12, 6, 6, 6, 23, 20, 15, 3, 17, 10, 22, 22, 21, 4, 19, 5, 2, 2, 14, 5, 14, 9, 23, 10, 18, 20, 11, 10, 11, 18, 0, 8, 11, 8, 22, 3, 11, 20, 17] } }, "b": { "dtype": "int8", "shape": [3, 4, 5], "data": { "kind": "values", "values": [11, 5, 23, 23, 23, 1, 12, 16, 21, 6, 22, 21, 24, 3, 7, 23, 8, 16, 3, 9, 10, 3, 4, 10, 23, 1, 3, 20, 16, 22, 5, 23, 11, 24, 11, 19, 22, 4, 16, 8, 20, 18, 24, 15, 5, 13, 21, 21, 13, 15, 22, 12, 18, 10, 23, 17, 18, 4, 22, 4] } } }, "outputs": { "c": { "dtype": "int8", "shape": [3, 4, 5], "tolerance": 0 } } }, { "name": "onnx_backend_div_uint32", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_uint32" }, "inputs": { "a": { "dtype": "uint32", "shape": [3, 4, 5], "data": { "kind": "values", "values": [17, 10, 9, 12, 13, 6, 6, 7, 8, 13, 7, 16, 22, 15, 8, 3, 6, 17, 7, 20, 2, 16, 18, 13, 23, 4, 4, 12, 17, 23, 22, 20, 1, 5, 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] } }, "b": { "dtype": "uint32", "shape": [3, 4, 5], "data": { "kind": "values", "values": [17, 17, 16, 11, 14, 9, 12, 21, 7, 10, 16, 4, 20, 13, 19, 18, 11, 3, 2, 12, 4, 13, 5, 2, 18, 1, 8, 5, 4, 6, 7, 4, 3, 9, 2, 5, 1, 14, 20, 10, 22, 6, 2, 8, 9, 23, 21, 8, 4, 22, 13, 4, 7, 21, 8, 20, 1, 6, 12, 10] } } }, "outputs": { "c": { "dtype": "uint32", "shape": [3, 4, 5], "tolerance": 0 } } }, { "name": "onnx_backend_div_uint8", "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_div_uint8" }, "inputs": { "a": { "dtype": "uint8", "shape": [3, 4, 5], "data": { "kind": "values", "values": [11, 14, 22, 14, 17, 14, 13, 21, 15, 17, 14, 2, 6, 17, 15, 7, 3, 9, 1, 18, 17, 3, 18, 3, 21, 11, 20, 0, 19, 20, 17, 1, 13, 9, 19, 1, 10, 17, 6, 14, 20, 7, 21, 5, 23, 17, 9, 16, 11, 15, 12, 13, 18, 9, 5, 0, 5, 20, 23, 21] } }, "b": { "dtype": "uint8", "shape": [3, 4, 5], "data": { "kind": "values", "values": [10, 2, 10, 15, 8, 12, 13, 6, 18, 1, 23, 23, 10, 7, 24, 17, 1, 16, 7, 24, 23, 21, 10, 17, 5, 12, 9, 11, 10, 4, 5, 1, 1, 4, 3, 10, 6, 15, 21, 6, 3, 21, 16, 2, 4, 5, 13, 18, 20, 6, 9, 8, 9, 17, 11, 3, 4, 19, 6, 20] } } }, "outputs": { "c": { "dtype": "uint8", "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_truncates_toward_zero_gpu_gap", "skipGpu": { "category": "todo", "reason": "The widened-i32 Div path has not been audited for signed int16 overflow and narrowing, including INT16_MIN / -1; keep the route disabled until those semantics have parity fixtures." }, "provenance": { "source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc", "test": "MathOpTest.Div_int16" }, "inputs": { "a": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [4, 8, -8] } }, "b": { "dtype": "int16", "shape": [3], "data": { "kind": "values", "values": [2, 3, 4] } } }, "outputs": { "c": { "dtype": "int16", "shape": [3], "tolerance": 0 } } }, { "name": "f32_snap_guard_half_integer_not_snapped", "inputs": { "a": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [5.0, 7.0, 9.0, 11.0, 3.0, 1.0, 13.0, 15.0] } }, "b": { "dtype": "float32", "shape": [8], "data": { "kind": "values", "values": [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0] } } }, "outputs": { "c": { "dtype": "float32", "shape": [8], "tolerance": 0 } } }, { "name": "f32_div_by_infinity", "inputs": { "a": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1.0, -1.0, 0.0, 100.0] } }, "b": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": ["Infinity", "Infinity", "Infinity", "-Infinity"] } } }, "outputs": { "c": { "dtype": "float32", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 0.0, 0.0, 0.0] } } } }, { "name": "int32_min_div_negative_one_broadcast", "inputs": { "a": { "dtype": "int32", "shape": [4], "data": { "kind": "values", "values": [-2147483648, -2147483648, 2147483647, -1] } }, "b": { "dtype": "int32", "shape": [1], "data": { "kind": "values", "values": [-1] } } }, "outputs": { "c": { "dtype": "int32", "shape": [4], "tolerance": 0 } } }, { "name": "f16_div_snap_broadcast_vec4", "inputs": { "a": { "dtype": "float16", "shape": [2, 8], "data": { "kind": "values", "values": [6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0, 30.0, 33.0, 36.0, 39.0, 42.0, 45.0, 48.0, 51.0] } }, "b": { "dtype": "float16", "shape": [1, 8], "data": { "kind": "values", "values": [3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0] } } }, "outputs": { "c": { "dtype": "float16", "shape": [2, 8], "tolerance": 0 } } } ] }