ai.onnx.Acosh / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
5e62c9a verified
Raw
History Blame
8.2 kB
{
"op": "ai.onnx.Acosh",
"cases": [
{
"name": "f32_values",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [1.0, 1.25, 2.0, 4.0, 8.0, 16.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001 } }
},
{
"name": "f16_values",
"inputs": {
"x": {
"dtype": "float16",
"shape": [2, 3],
"data": { "kind": "values", "values": [1.0, 1.25, 2.0, 4.0, 8.0, 16.0] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 3] } },
"tolerance": 0.002
},
{
"name": "out_of_domain_returns_nan",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [0.5, 0.0, -1.0, 0.9, -5.0, 0.99] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001, "allowNaN": true } }
},
{
"name": "f16_domain_and_nonfinite_values",
"inputs": {
"x": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": [1.0, 1.001, 2.0, 0.999, 0.0, "Infinity", "-Infinity", "NaN"] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0.003, "allowNaN": true } }
},
{
"name": "large_in_domain_args_no_overflow",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": {
"kind": "values",
"values": [10000000000.0, 1000000000000000.0, 100000000000000000000.0, 1e+30, 3e+38, 1e+25]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.001 } }
},
{
"name": "f32_large_in_domain_accuracy_gpu_gap",
"skipGpu": {
"category": "todo",
"reason": "The current f32 implementation differs from the CPU reference by about one ULP at large finite magnitudes. A higher-accuracy f32 algorithm or software-extended precision could close this implementable gap."
},
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Acosh",
"notes": "Large finite in-domain values exercise Acosh's overflow-avoidance region; CPU and ORT agree within a tighter bound than the current WGSL builtin path."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": {
"kind": "values",
"values": [10000000000.0, 1000000000000000.0, 100000000000000000000.0, 1e+30, 3e+38, 1e+25]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001, "relTolerance": 0 } }
},
{
"name": "ort_float_in_domain_range",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Acosh"
},
"inputs": {
"x": { "dtype": "float32", "shape": [5], "data": { "kind": "values", "values": [1.0, 1.1, 3.0, 10.0, 100.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.Acosh",
"notes": "Adds boundary, out-of-domain, and non-finite inputs around acosh's x >= 1 domain."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [1.0, 1.0000001, 2.0, 0.9999999, 0.0, -1.0, "Infinity", "NaN"] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [8], "tolerance": 0.00001, "allowNaN": true } }
},
{
"name": "onnx_backend_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_acosh_example" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3],
"data": { "kind": "values", "values": [10.0, 2.7182817459106445, 1.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_acosh",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_acosh" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [5.939321517944336, 7.436704158782959, 6.424870491027832, 5.903948783874512, 4.812893390655518, 6.813046932220459, 4.938284873962402, 9.025957107543945, 9.672965049743652, 4.4509735107421875, 8.12552547454834, 5.760054111480713, 6.112401008605957, 9.33036994934082, 1.6393245458602905, 1.7841637134552002, 1.1819655895233154, 8.493578910827637, 8.003410339355469, 8.830109596252441, 9.807564735412598, 8.192426681518555, 5.153314113616943, 8.024762153625488, 2.064469814300537, 6.759289264678955, 2.290179491043091, 9.502019882202148, 5.696634769439697, 4.73195743560791, 3.381000518798828, 7.968103408813477, 5.105352878570557, 6.11590576171875, 1.1691081523895264, 6.558719635009766, 6.508861541748047, 6.552405834197998, 9.493732452392578, 7.136382579803467, 4.235570907592773, 4.933287620544434, 7.278680801391602, 1.5420292615890503, 7.0009002685546875, 7.035740852355957, 2.8934431076049805, 2.16033673286438, 3.838855266571045, 4.273396968841553, 6.131771087646484, 4.947413444519043, 9.895364761352539, 1.9184032678604126, 2.8798909187316895, 2.4517855644226074, 6.877974987030029, 3.2796244621276855, 5.196796894073486, 3.1998302936553955]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.00001, "allowNaN": true } }
},
{
"name": "onnx_backend_acosh_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_acosh_example" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3],
"data": { "kind": "values", "values": [10.0, 2.7182817459106445, 1.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.00001 } }
},
{
"name": "vec4_f32_large_magnitude_guard",
"inputs": {
"x": {
"dtype": "float32",
"shape": [4],
"data": {
"kind": "values",
"values": [100000000000000000.0, 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4] } }
},
{
"name": "empty_input_zero_dim",
"inputs": { "x": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "vec4_f32_out_of_domain_nan",
"inputs": {
"x": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [1.0, 1.5, 2.0, 100000000.0, 0.999999, 0.5, 0.0, -3.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [8], "tolerance": 0.000001, "allowNaN": true } }
},
{
"name": "f32_vec4_sustained_1024",
"inputs": {
"x": { "dtype": "float32", "shape": [1024], "data": { "kind": "linspace", "start": 1.0, "end": 16.0 } }
},
"outputs": { "y": { "dtype": "float32", "shape": [1024], "tolerance": 0.00001 } }
},
{
"name": "f32_scalar_tail_4097",
"provenance": {
"notes": "Compact sibling for the f32 Acosh scalar-fallback benchmark; count is intentionally not divisible by four and all values stay in-domain."
},
"inputs": {
"x": { "dtype": "float32", "shape": [4097], "data": { "kind": "linspace", "start": 1.0, "end": 10.0 } }
},
"outputs": { "y": { "dtype": "float32", "shape": [4097], "tolerance": 0.00001, "relTolerance": 0.00001 } }
}
]
}