ai.onnx.Atanh / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 91d990483a17
8398b43 verified
Raw History Blame
11 kB
{
"cases": [
{
"name": "f32_values",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [-0.9, -0.5, 0.0, 0.25, 0.5, 0.9] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001 } }
},
{
"name": "f32_subnormal_identity_tail_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: WebGPU/Metal flushes subnormals to zero (f32 and f16); the kernel cannot preserve denormal inputs/outputs bit-exactly."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh",
"notes": "For tiny finite inputs atanh(x) rounds back to x in float32; zero-flushing erases the signed tail."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [-1e-39, -1e-40, 1e-40, 1e-39] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0 } }
},
{
"name": "f32_near_unit_boundary_accuracy_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "Near the high-slope domain boundary, the package's f32 result differs from the correctly rounded expected value by about one ULP. A higher-accuracy algorithm or software-extended precision could close the gap."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh",
"notes": "Values just inside the open Atanh domain are finite but numerically sensitive, distinguishing a rounded finite result from an incorrect Inf or NaN classification."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [4],
"data": {
"kind": "values",
"values": [-0.9999999403953552, -0.9999998807907104, 0.9999998807907104, 0.9999999403953552]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 5e-7, "relTolerance": 0 } }
},
{
"name": "f32_subnormal_identity_tail_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: WebGPU/Metal flushes subnormals to zero (f32 and f16); the kernel cannot preserve denormal inputs/outputs bit-exactly."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh",
"notes": "Unaligned scalar-path subnormal inputs have valid finite Atanh outputs."
},
"inputs": {
"x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0 } }
},
{
"name": "f32_near_unit_boundary_accuracy_scalar_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "Near the high-slope domain boundary, the package's scalar f32 result differs from the correctly rounded expected value by about one ULP. A higher-accuracy algorithm or software-extended precision could close the gap."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh",
"notes": "Unaligned scalar-path values just inside the open Atanh domain exercise finite near-boundary accuracy."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [3],
"data": { "kind": "values", "values": [-0.9999999403953552, 0.9999998807907104, 0.9999999403953552] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 5e-7, "relTolerance": 0 } }
},
{
"name": "f16_values",
"inputs": {
"x": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [-0.9, -0.5, 0.0, 0.25, 0.5, 0.9] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 3] } },
"tolerance": 0.003
},
{
"name": "out_of_domain_returns_nan",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [1.5, -1.5, 2.0, -2.0, 1.0, -1.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001, "allowNaN": true } }
},
{
"name": "f16_domain_and_nonfinite_values",
"inputs": {
"x": {
"dtype": "float16",
"shape": [10],
"data": { "kind": "values", "values": [-1.0, -0.999, 0.0, 0.0, 0.999, 1.0, 1.001, -1.001, "Infinity", "NaN"] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [10], "tolerance": 0.003, "allowNaN": true } }
},
{
"name": "ort_float_boundary_interval",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh"
},
"inputs": {
"x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [-1.0, -0.5, 0.0, 0.5, 1.0] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [5], "tolerance": 0.00001 } }
},
{
"name": "ort_domain_and_nonfinite_values",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Atanh",
"notes": "Adds endpoints, out-of-domain values, signed infinities, signed zero, and NaN."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [11],
"data": {
"kind": "values",
"values": [-1.0, -0.9999999, 0.0, 0.0, 0.9999999, 1.0, 1.0000001, -1.0000001, "Infinity", "-Infinity", "NaN"]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [11], "tolerance": 0.00001, "allowNaN": true } }
},
{
"name": "onnx_backend_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_atanh_example" },
"inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-0.5, 0.0, 0.5] } } },
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_atanh",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_atanh" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [0.54881352186203, 0.7151893377304077, 0.6027633547782898, 0.5448831915855408, 0.42365479469299316, 0.6458941102027893, 0.4375872015953064, 0.891772985458374, 0.9636627435684204, 0.3834415078163147, 0.7917250394821167, 0.5288949012756348, 0.5680445432662964, 0.9255966544151306, 0.07103605568408966, 0.08712930232286453, 0.020218396559357643, 0.832619845867157, 0.7781567573547363, 0.8700121641159058, 0.978618323802948, 0.7991585731506348, 0.4614793658256531, 0.7805292010307312, 0.11827442795038223, 0.6399210095405579, 0.14335328340530396, 0.9446688890457153, 0.5218483209609985, 0.4146619439125061, 0.26455560326576233, 0.7742336988449097, 0.4561503231525421, 0.568433940410614, 0.018789799883961678, 0.6176354885101318, 0.6120957136154175, 0.6169340014457703, 0.9437480568885803, 0.681820273399353, 0.35950788855552673, 0.43703195452690125, 0.6976311802864075, 0.0602254718542099, 0.6667667031288147, 0.670637845993042, 0.21038256585597992, 0.12892629206180573, 0.31542834639549255, 0.36371076107025146, 0.5701967477798462, 0.4386015236377716, 0.9883738160133362, 0.10204481333494186, 0.20887675881385803, 0.16130951046943665, 0.6531082987785339, 0.25329160690307617, 0.4663107693195343, 0.24442559480667114]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.00001, "allowNaN": true } }
},
{
"name": "onnx_backend_atanh_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_atanh_example" },
"inputs": { "x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [-0.5, 0.0, 0.5] } } },
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.00001 } }
},
{
"name": "vec4_f16_lanes",
"inputs": {
"x": {
"dtype": "float16",
"shape": [16],
"data": {
"kind": "values",
"values": [-0.95, -0.9, -0.75, -0.5, -0.25, -0.125, 0.0, 0.0625, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 0.95]
}
}
},
"outputs": { "y": { "dtype": "float16", "shape": [16], "tolerance": 0.001, "relTolerance": 0.005 } }
},
{
"name": "empty_input_zero_dim",
"inputs": { "x": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "f32_near_unit_boundary_gpu_runnable",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [-0.9999, -0.999, -0.99, 0.99, 0.999, 0.9999] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.001, "relTolerance": 0.0001 } }
},
{
"name": "rank0_scalar",
"inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [0.5] } } },
"outputs": {
"y": {
"dtype": "float32",
"shape": [],
"data": { "kind": "values", "values": [0.5493061443340549] },
"tolerance": 0.000001
}
}
},
{
"name": "f32_boundary_exact_one_and_neg_one",
"inputs": {
"x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [-1.0, -0.5, 0.5, 1.0] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.000001, "allowNaN": true } }
},
{
"name": "f16_empty_zero_numel_shape",
"inputs": { "x": { "dtype": "float16", "shape": [0], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float16", "shape": [0] } }
},
{
"name": "f32_vec4_sustained_1024",
"inputs": {
"x": { "dtype": "float32", "shape": [1024], "data": { "kind": "linspace", "start": -0.9, "end": 0.9 } }
},
"outputs": { "y": { "dtype": "float32", "shape": [1024], "tolerance": 0.00001 } }
}
]
}