File size: 10,180 Bytes
ebc1b30 c0e2f2a ebc1b30 c0e2f2a ebc1b30 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | {
"cases": [
{
"name": "vector_positive",
"inputs": { "x": { "dtype": "float32", "shape": [32], "data": { "kind": "constant", "value": 2.5 } } },
"outputs": { "y": { "dtype": "float32", "shape": [32], "tolerance": 0.000001 } }
},
{
"name": "rank0_scalar_positive",
"inputs": { "x": { "dtype": "float32", "shape": [], "data": { "kind": "values", "values": [4.0] } } },
"outputs": { "y": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
},
{
"name": "domain_edges_zero_negative_inf",
"inputs": {
"x": {
"dtype": "float32",
"shape": [6],
"data": { "kind": "values", "values": [0.0, -1.0, -5.0, "Infinity", "NaN", 1.0] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [6], "tolerance": 0.000001, "allowNaN": true } }
},
{
"name": "f32_positive_subnormal_inputs_finite_logs_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.Log",
"notes": "Positive subnormal inputs are inside Log's domain and should produce finite large negative values; flushing them to zero produces -Infinity."
},
"inputs": {
"x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-45, 1e-40, 1e-39, 1e-38] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.000001 } }
},
{
"name": "f32_positive_subnormal_inputs_finite_logs_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.Log",
"notes": "Unaligned scalar-path positive subnormal inputs exercise finite Log results."
},
"inputs": {
"x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-45, 1e-40, 1e-38] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.000001 } }
},
{
"name": "f16_positive_values",
"inputs": {
"x": { "dtype": "float16", "shape": [5], "data": { "kind": "values", "values": [0.25, 0.5, 1.0, 2.0, 8.0] } }
},
"outputs": { "y": { "dtype": "float16", "shape": [5], "tolerance": 0.002 } }
},
{
"name": "subnormal_positive_f32",
"inputs": {
"x": {
"dtype": "float32",
"shape": [4],
"data": { "kind": "values", "values": [1.17549435e-38, 1e-37, 1e-20, 1e-10] }
}
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.00001 } }
},
{
"name": "positive_subnormal_values_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.Log",
"notes": "Positive subnormal inputs are valid for Log; flushing them to zero turns finite logs into -Infinity."
},
"inputs": {
"x": { "dtype": "float32", "shape": [4], "data": { "kind": "values", "values": [1e-45, 1e-40, 1e-39, 1e-38] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.00001 } }
},
{
"name": "positive_subnormal_values_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.Log",
"notes": "On the scalar path, positive subnormal inputs are valid and must produce finite logarithms."
},
"inputs": {
"x": { "dtype": "float32", "shape": [3], "data": { "kind": "values", "values": [1e-45, 1e-40, 1e-39] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [3], "tolerance": 0.00001 } }
},
{
"name": "ort_float_2x2",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Log"
},
"inputs": {
"x": { "dtype": "float32", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 5.0, 10.0] } }
},
"outputs": { "y": { "dtype": "float32", "shape": [2, 2], "tolerance": 0.000001 } }
},
{
"name": "ort_float16_2x2_projection",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Log",
"notes": "Float16 projection of ORT's float Log node values."
},
"inputs": {
"x": { "dtype": "float16", "shape": [2, 2], "data": { "kind": "values", "values": [1.0, 2.0, 5.0, 10.0] } }
},
"outputs": { "y": { "dtype": "float16", "shape": [2, 2], "tolerance": 0.002 } }
},
{
"name": "signed_zero_negative_infinity_domain",
"provenance": {
"source": "onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc",
"test": "MathOpTest.Log",
"notes": "Additional node-level domain boundary: log(+/-0) is -Infinity, negative finite and -Infinity inputs produce NaN, and log(+Infinity) is +Infinity."
},
"inputs": {
"x": {
"dtype": "float32",
"shape": [7],
"data": { "kind": "values", "values": [0.0, 0.0, -1.0, "-Infinity", 1.0, "Infinity", "NaN"] }
}
},
"outputs": {
"y": {
"dtype": "float32",
"shape": [7],
"tolerance": 0,
"allowNaN": true,
"data": { "kind": "values", "values": ["-Infinity", "-Infinity", "NaN", "NaN", 0.0, "Infinity", "NaN"] }
}
}
},
{
"name": "onnx_backend_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_log_example" },
"inputs": { "x": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 10.0] } } },
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.000001 } }
},
{
"name": "onnx_backend_log",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_log" },
"inputs": {
"x": {
"dtype": "float32",
"shape": [3, 4, 5],
"data": {
"kind": "values",
"values": [5.8360395431518555, 1.4920592308044434, 2.6610958576202393, 9.401724815368652, 6.472471237182617, 0.37633413076400757, 2.5859384536743164, 0.859540581703186, 0.901929497718811, 1.507719874382019, 1.1549344062805176, 4.281371593475342, 2.1404964923858643, 1.1293870210647583, 1.5587172508239746, 1.3960884809494019, 4.4552321434021, 0.8145183324813843, 1.3676141500473022, 0.4256679117679596, 0.07784857600927353, 1.9224849939346313, 2.3736672401428223, 0.47608205676078796, 9.677026748657227, 0.23354846239089966, 1.0468215942382812, 0.8292912244796753, 4.6310296058654785, 4.346446990966797, 1.1675965785980225, 1.4596000909805298, 0.4115660488605499, 0.1379593163728714, 0.706160843372345, 1.1692341566085815, 3.4222238063812256, 3.3280277252197266, 0.6788691878318787, 0.7391142249107361, 0.3504444658756256, 0.24170967936515808, 0.18154163658618927, 7.034140110015869, 0.6007044911384583, 0.6452777981758118, 0.285705029964447, 2.176004409790039, 0.1991100162267685, 0.8083661198616028, 0.4084170162677765, 1.4724129438400269, 0.6000123023986816, 0.3070845305919647, 0.9722112417221069, 1.5346952676773071, 1.0687793493270874, 1.3531996011734009, 0.5302948355674744, 0.6957665085792542]
}
}
},
"outputs": { "y": { "dtype": "float32", "shape": [3, 4, 5], "tolerance": 0.00001, "allowNaN": true } }
},
{
"name": "onnx_backend_log_example",
"provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_log_example" },
"inputs": { "x": { "dtype": "float32", "shape": [2], "data": { "kind": "values", "values": [1.0, 10.0] } } },
"outputs": { "y": { "dtype": "float32", "shape": [2], "tolerance": 0.00001 } }
},
{
"name": "empty_input_zero_dim",
"inputs": { "x": { "dtype": "float32", "shape": [0], "data": { "kind": "values", "values": [] } } },
"outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
},
{
"name": "f16_domain_edges_scalar_path",
"inputs": {
"x": {
"dtype": "float16",
"shape": [5],
"data": { "kind": "values", "values": [0.0, -1.0, "-Infinity", "Infinity", 1.0] }
}
},
"outputs": { "y": { "dtype": "float16", "shape": [5], "allowNaN": true } },
"tolerance": 0.001
},
{
"name": "f16_domain_edges_vec4_path",
"inputs": {
"x": { "dtype": "float16", "shape": [4], "data": { "kind": "values", "values": [0.0, -2.0, "Infinity", 1.0] } }
},
"outputs": { "y": { "dtype": "float16", "shape": [4], "allowNaN": true } },
"tolerance": 0.001
}
]
}
|