Download build/webgpu/test.json from webgpu-kernels/ai.onnx.IsInf: direct link, hf CLI and curl.
- Browser
- Download file 13.3 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.IsInf/resolve/v1/build/webgpu/test.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.IsInf@v1/build/webgpu/test.json
-
curl -L -o test.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.IsInf/resolve/v1/build/webgpu/test.json
13.3 kB
| { | |
| "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", "Infinity", "Infinity", "Infinity"] } | |
| } | |
| }, | |
| "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-size input with detect_negative=0 and detect_positive=0 checks that IsInf handles an empty tensor without reading any elements, since neither condition is ever true anyway." | |
| }, | |
| "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": "Eight float32 Infinity values with detect_negative=0 and detect_positive=0 check that IsInf still reports false for every element even though the data itself is infinite, since neither detection flag is enabled." | |
| }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [8], | |
| "data": { | |
| "kind": "values", | |
| "values": ["Infinity", "Infinity", "Infinity", "Infinity", "Infinity", "Infinity", "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, "Infinity", 1.0] } | |
| } | |
| }, | |
| "outputs": { | |
| "y": { "dtype": "bool", "shape": [4], "tolerance": 0, "data": { "kind": "values", "values": [0, 0, 1, 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": "A rank-7 flat input exercises the shared vec4 unary path, whose indexing depends only on total element count." | |
| } | |
| }, | |
| { | |
| "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": "A rank-seven input with three values checks IsInf on a high-rank shape whose element count is not a multiple of four." | |
| } | |
| } | |
| ] | |
| } | |