| { |
| "op": "ai.onnx.IsInf", |
| "cases": [ |
| { |
| "name": "f32_detect_both", |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [2, 4], |
| "data": { |
| "kind": "values", |
| "values": [1.0, "Infinity", "-Infinity", "NaN", 0.0, 65504.0, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [2, 4] } } |
| }, |
| { |
| "name": "f32_detect_positive_only", |
| "attrs": { "detect_negative": 0, "detect_positive": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [5], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", 10.0, "NaN", 0.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [5] } } |
| }, |
| { |
| "name": "f16_detect_negative_only", |
| "attrs": { "detect_negative": 1, "detect_positive": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [2, 3], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN", -2.0, 0.0, "-Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [2, 3] } } |
| }, |
| { |
| "name": "detect_neither", |
| "attrs": { "detect_negative": 0, "detect_positive": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [5], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN", 1.0, -1.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [5], "tolerance": 0 } } |
| }, |
| { |
| "name": "scalar_positive_inf", |
| "inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": ["Infinity"] } } }, |
| "outputs": { "y": { "dtype": "bool", "shape": [], "tolerance": 0 } } |
| }, |
| { |
| "name": "zero_size_noop", |
| "inputs": { "x": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "bool", "shape": [0], "tolerance": 0 } } |
| }, |
| { |
| "name": "detect_neither_zero_size", |
| "attrs": { "detect_negative": 0, "detect_positive": 0 }, |
| "provenance": { "notes": "Zero-dispatch regression for the input-free detect-neither specialization." }, |
| "inputs": { "x": { "dtype": "float16", "shape": [0], "data": { "kind": "values", "values": [] } } }, |
| "outputs": { "y": { "dtype": "bool", "shape": [0], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float_detect_both", |
| "attrs": { "detect_negative": 1, "detect_positive": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_float20" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.2, "NaN", "Infinity", 2.8, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float_detect_negative_only", |
| "attrs": { "detect_negative": 1, "detect_positive": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_negative_float20" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.7, "NaN", "Infinity", 3.6, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float_detect_positive_only", |
| "attrs": { "detect_negative": 0, "detect_positive": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_positive_float20" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.7, "NaN", "Infinity", 3.6, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float16_detect_positive_only", |
| "attrs": { "detect_negative": 0, "detect_positive": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_positive_mlfloat16" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.7, "NaN", "Infinity", 3.6, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float16_detect_both", |
| "attrs": { "detect_negative": 1, "detect_positive": 1 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_mlfloat16" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.7, "NaN", "Infinity", 3.6, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_float16_detect_negative_only", |
| "attrs": { "detect_negative": 1, "detect_positive": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_isinf_negative_mlfloat16" |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [6], |
| "data": { "kind": "values", "values": [-1.7, "NaN", "Infinity", 3.6, "-Infinity", "Infinity"] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "onnx_backend_isinf", |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { |
| "kind": "values", |
| "values": [-1.2000000476837158, "NaN", "Infinity", 2.799999952316284, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6] } }, |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_isinf" } |
| }, |
| { |
| "name": "onnx_backend_isinf_float16", |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [6], |
| "data": { |
| "kind": "values", |
| "values": [-1.2001953125, "NaN", "Infinity", 2.80078125, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6] } }, |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_isinf_float16" } |
| }, |
| { |
| "name": "onnx_backend_isinf_negative", |
| "attrs": { "detect_positive": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { |
| "kind": "values", |
| "values": [-1.7000000476837158, "NaN", "Infinity", -3.5999999046325684, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6] } }, |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_isinf_negative" } |
| }, |
| { |
| "name": "onnx_backend_isinf_positive", |
| "attrs": { "detect_negative": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { |
| "kind": "values", |
| "values": [-1.7000000476837158, "NaN", "Infinity", 3.5999999046325684, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6] } }, |
| "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_isinf_positive" } |
| }, |
| { |
| "name": "vec4_f16_lanes", |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [8], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", 0.0, 1.0, -1.0, 65504.0, "NaN", -2.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [8] } } |
| }, |
| { |
| "name": "vec4_f32_detect_positive_only", |
| "attrs": { "detect_negative": 0, "detect_positive": 1 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { |
| "kind": "values", |
| "values": ["Infinity", "-Infinity", "NaN", 0.0, -1.5, 3.6, "Infinity", "-Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "vec4_f32_detect_negative_only", |
| "attrs": { "detect_negative": 1, "detect_positive": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { |
| "kind": "values", |
| "values": ["Infinity", "-Infinity", "NaN", 0.0, -1.5, 3.6, "Infinity", "-Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "vec4_f32_detect_neither", |
| "attrs": { "detect_negative": 0, "detect_positive": 0 }, |
| "provenance": { |
| "notes": "Selection regression for the detect-neither constant-fill specialization, whose result does not require an X buffer binding." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [8], |
| "data": { |
| "kind": "values", |
| "values": ["Infinity", "-Infinity", "NaN", 0.0, -1.5, 3.6, "Infinity", "-Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "vec4_f16_detect_negative_only", |
| "attrs": { "detect_negative": 1, "detect_positive": 0 }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [8], |
| "data": { |
| "kind": "values", |
| "values": ["Infinity", "-Infinity", "NaN", 0.0, -1.5, 3.6, "Infinity", "-Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [8], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_exact_float_detect_neither", |
| "attrs": { "detect_negative": 0, "detect_positive": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_Float8E5M2_none", |
| "notes": "Float32 projection of ORT's detect-neither attribute combination." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [6], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN", 0.0, 0.0, 3.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "ort_bool_exact_float16_detect_neither", |
| "attrs": { "detect_negative": 0, "detect_positive": 0 }, |
| "provenance": { |
| "source": "onnxruntime/test/providers/cpu/tensor/isinf_test.cc", |
| "test": "IsInfTest.test_Float8E5M2_none", |
| "notes": "Float16 projection of ORT's detect-neither attribute combination." |
| }, |
| "inputs": { |
| "x": { |
| "dtype": "float16", |
| "shape": [6], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", "NaN", 0.0, 0.0, 3.5] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [6], "tolerance": 0 } } |
| }, |
| { |
| "name": "f16_max_finite_not_inf", |
| "inputs": { |
| "x": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [65504.0, -65504.0, 0.0, 1.0] } } |
| }, |
| "outputs": { |
| "y": { "dtype": "bool", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0, 0, 0, 0] } } |
| } |
| }, |
| { |
| "name": "rank7_vec4_detect_both", |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 1, 1, 1, 8], |
| "data": { |
| "kind": "values", |
| "values": ["Infinity", "-Infinity", "NaN", 0.0, 1.0, 65504.0, "-Infinity", "Infinity"] |
| } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [1, 1, 1, 1, 1, 1, 8], "tolerance": 0 } }, |
| "provenance": { |
| "notes": "Rank-7 flat input on the shared vec4 unary kernel (indexes by flat numel, so rank is irrelevant; sibling Cast/LeakyRelu impose no rank cap). Covers the regime the removed 'ranks.x <= 6' guard rejected." |
| } |
| }, |
| { |
| "name": "rank7_scalar_detect_both", |
| "inputs": { |
| "x": { |
| "dtype": "float32", |
| "shape": [1, 1, 1, 1, 1, 1, 3], |
| "data": { "kind": "values", "values": ["Infinity", "-Infinity", 1.0] } |
| } |
| }, |
| "outputs": { "y": { "dtype": "bool", "shape": [1, 1, 1, 1, 1, 1, 3], "tolerance": 0 } }, |
| "provenance": { |
| "notes": "Rank-7 input, numel 3 (not a multiple of 4) routes to the scalar elementwise unary variant." |
| } |
| } |
| ] |
| } |
|
|