ai.onnx.Ceil / build /webgpu /test.json
Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
dd530eb verified
Raw
History Blame
8.01 kB
{
"op": "ai.onnx.Ceil",
"cases": [
{
"name": "f32_values",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [-2.7, -1.2, -0.1, 0.0, 1.2, 2.9] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6] } }
},
{
"name": "rank0_negative_fraction",
"inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [-1.25] } } },
"outputs": { "y": { "dtype": "float32", "shape": [] } }
},
{
"name": "nonfinite_and_integer_values",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": ["-Infinity", -2.0, 0.0, 1e-7, "Infinity", "NaN"] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0, "allowNaN": true } }
},
{
"name": "f32_subnormal_boundary_vec4_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.Ceil",
"notes": "Positive subnormal inputs are strictly greater than zero, so Ceil must round them up to one; flushing them to zero changes the boundary result."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [-1e-40, 0.0, 1e-40, 1.0000001] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0 } }
},
{
"name": "f32_subnormal_boundary_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.Ceil",
"notes": "Scalar-path companion for positive subnormal Ceil boundary behavior."
},
"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": "zero_size_noop",
"inputs": { "x": { "dtype": "float32", "shape": [0, 2], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [0, 2], "tolerance": 0 } }
},
{
"name": "f16_fractional_nonfinite_values",
"inputs": {
"x": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": ["-Infinity", -1.5, -0.5, -0.0001, 0.0001, 1.5, "Infinity", "NaN"] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [8], "tolerance": 0, "allowNaN": true } }
},
{
"name": "ort_float_2x2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Ceil"
},
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [-1.5, 0.2, -0.5, 10.3] } }
},
"outputs": {
"y": {
"dtype": "float32",
"shape": [2, 2],
"tolerance": 0,
"data": { "kind": "values", "values": [-1.0, 1.0, 0.0, 11.0] }
}
}
},
{
"name": "onnx_backend_example",
"provenance": {
"source": "cmake/external/onnx/onnx/backend/test/data/node/test_ceil_example",
"test": "test_ceil_example"
},
"inputs": {
"x": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [-1.5, 1.2000000476837158] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0 } }
},
{
"name": "onnx_backend_ceil",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_ceil" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [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]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0 } }
},
{
"name": "onnx_backend_ceil_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_ceil_example" },
"inputs": {
"x": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [-1.5, 1.2000000476837158] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.00001 } }
},
{
"name": "f16_exact_integer_and_nonfinite",
"inputs": {
"x": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": ["-Infinity", -65504.0, -1.0, 0.0, 1.0, 65504.0, "Infinity", "NaN"] }
}
},
"outputs": {
"y": {
"dtype": "float16",
"shape": [8],
"data": { "kind": "values", "values": ["-Infinity", -65504.0, -1.0, 0.0, 1.0, 65504.0, "Infinity", "NaN"] },
"tolerance": 0,
"allowNaN": true
}
}
},
{
"name": "f32_near_half_integer_vec4_boundary",
"inputs": {
"x": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [-2.0001, -1.9999, -0.5001, -0.4999, 0.4999, 0.5001, 1.9999, 2.0001] }
}
},
"outputs": {
"y": {
"dtype": "float32",
"shape": [8],
"data": { "kind": "values", "values": [-2.0, -1.0, 0.0, 0.0, 1.0, 1.0, 2.0, 3.0] },
"tolerance": 0
}
}
},
{
"name": "f32_vec4_sustained_4096",
"provenance": {
"notes": "Compact sibling for Ceil f32 vec4 throughput benchmarks; aligned numel keeps the packed path active over a sustained fractional range."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [4096],
"data": { "kind": "fillFloat32", "sinStep": 0.017, "cosStep": 0.011, "scale": 10.0 }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4096], "tolerance": 0 } }
}
]
}