File size: 9,472 Bytes
32be2c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a623e81
32be2c7
 
 
 
a623e81
32be2c7
 
 
 
 
 
 
 
 
 
 
 
 
a623e81
32be2c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
208
209
210
211
212
213
214
215
216
217
{
  "cases": [
    {
      "name": "periodic_f32_size16",
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [16], "tolerance": 0.00001 } }
    },
    {
      "name": "symmetric_f32_size16",
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [16], "tolerance": 0.00001 } }
    },
    {
      "name": "periodic_f32_size10",
      "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_hannwindow" },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [10] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [10], "tolerance": 0.00001 } }
    },
    {
      "name": "symmetric_f32_size10_onnx_backend",
      "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_hannwindow_symmetric" },
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [10] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [10], "tolerance": 0.00001 } }
    },
    {
      "name": "periodic_f32_size0_empty",
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [0] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [0], "tolerance": 0 } }
    },
    {
      "name": "periodic_f32_size1_boundary",
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [1], "tolerance": 0.00001 } }
    },
    {
      "name": "symmetric_f32_size1_nan_boundary",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/signal/signal_ops_test.cc",
        "test": "SignalOpsTest.HannWindowFloat",
        "notes": "Additional ORT-validated edge: symmetric size 1 uses denominator length - 1 = 0 and produces NaN."
      },
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [1],
          "tolerance": 0,
          "allowNaN": true,
          "data": { "kind": "values", "values": ["NaN"] }
        }
      }
    },
    {
      "name": "symmetric_f32_odd_size7",
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [7] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [7], "tolerance": 0.00001 } }
    },
    {
      "name": "periodic_f16_size32",
      "attrs": { "output_datatype": 10 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [32] } } },
      "outputs": { "y": { "dtype": "float16", "shape": [32], "tolerance": 0.002 } }
    },
    {
      "name": "ort_periodic_uint32_output_size8",
      "provenance": {
        "source": "ONNX Runtime CPUExecutionProvider",
        "notes": "ONNX HannWindow computes in float and applies output_datatype=UINT32 as a final cast."
      },
      "attrs": { "output_datatype": 12 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [8] } } },
      "outputs": {
        "y": {
          "dtype": "uint32",
          "shape": [8],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 0, 0, 0, 1, 0, 0, 0] }
        }
      }
    },
    {
      "name": "ort_symmetric_int32_output_size1_zero_cast",
      "provenance": {
        "source": "ONNX Runtime CPUExecutionProvider",
        "notes": "The symmetric size-one formula produces NaN in float; ONNX Cast to INT32 maps that value to zero."
      },
      "attrs": { "output_datatype": 6, "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [1] } } },
      "outputs": {
        "y": { "dtype": "int32", "shape": [1], "tolerance": 0, "data": { "kind": "values", "values": [0] } }
      }
    },
    {
      "name": "onnx_standard_periodic_int8_output_size8",
      "attrs": { "output_datatype": 3 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [8] } } },
      "outputs": {
        "y": {
          "dtype": "int8",
          "shape": [8],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 0, 0, 0, 1, 0, 0, 0] }
        }
      }
    },
    {
      "name": "onnx_standard_periodic_uint8_output_size8",
      "attrs": { "output_datatype": 2 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [8] } } },
      "outputs": {
        "y": {
          "dtype": "uint8",
          "shape": [8],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 0, 0, 0, 1, 0, 0, 0] }
        }
      }
    },
    {
      "name": "onnx_standard_periodic_int16_output_size8",
      "attrs": { "output_datatype": 5 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [8] } } },
      "outputs": {
        "y": {
          "dtype": "int16",
          "shape": [8],
          "tolerance": 0,
          "data": { "kind": "values", "values": [0, 0, 0, 0, 1, 0, 0, 0] }
        }
      }
    },
    {
      "name": "periodic_f32_size257_phase_accuracy_gpu_gap",
      "skipGpu": {
        "category": "todo",
        "reason": "The package's f32 cosine and range-reduction path crosses the final rounding boundary for this periodic size-257 window. A correctly rounded approximation or software-extended precision could close the gap."
      },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/signal/signal_ops_test.cc",
        "test": "SignalOpsTest.HannWindowFloat",
        "notes": "A periodic size-257 window stresses float32 phase formation across non-cardinal cosine positions and exposes final-rounding error in the cosine sum."
      },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [257] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [257], "tolerance": 6e-8, "relTolerance": 0 } }
    },
    {
      "name": "symmetric_f32_size257_phase_accuracy_gpu_gap",
      "skipGpu": {
        "category": "todo",
        "reason": "The current f32 cosine and range-reduction path crosses the final rounding boundary for this symmetric size-257 window. A correctly rounded approximation or software-extended precision could close this implementable gap."
      },
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/signal/signal_ops_test.cc",
        "test": "SignalOpsTest.HannWindowFloat",
        "notes": "For a symmetric odd-sized window, the length-minus-one denominator shifts every non-cardinal cosine sample and exposes float32 phase drift."
      },
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [257] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [257], "tolerance": 6e-8, "relTolerance": 0 } }
    },
    {
      "name": "ort_periodic_f32_size32",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/signal/signal_ops_test.cc",
        "test": "SignalOpsTest.HannWindowFloat"
      },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [32] } } },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [32],
          "tolerance": 0.00001,
          "data": {
            "kind": "values",
            "values": [0.0, 0.009607, 0.03806, 0.084265, 0.146447, 0.222215, 0.308658, 0.402455, 0.5, 0.597545, 0.691342, 0.777785, 0.853553, 0.915735, 0.96194, 0.990393, 1.0, 0.990393, 0.96194, 0.915735, 0.853553, 0.777785, 0.691342, 0.597545, 0.5, 0.402455, 0.308658, 0.222215, 0.146447, 0.084265, 0.03806, 0.009607]
          }
        }
      }
    },
    {
      "name": "periodic_int32_size8",
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [8] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [8], "tolerance": 0.00001 } }
    },
    {
      "name": "symmetric_f32_size2_denom1",
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [2] } } },
      "outputs": {
        "y": {
          "dtype": "float32",
          "shape": [2],
          "tolerance": 0.00001,
          "data": { "kind": "values", "values": [0.0, 0.0] }
        }
      }
    },
    {
      "name": "symmetric_f32_size4_cardinal_verify",
      "attrs": { "periodic": 0 },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [4] } } },
      "outputs": { "y": { "dtype": "float32", "shape": [4], "tolerance": 0.00001 } }
    },
    {
      "name": "symmetric_f16_size16",
      "attrs": { "output_datatype": 10, "periodic": 0 },
      "requires": { "features": ["shader-f16"] },
      "inputs": { "size": { "dtype": "int32", "shape": [], "data": { "kind": "values", "values": [16] } } },
      "outputs": { "y": { "dtype": "float16", "shape": [16], "tolerance": 0.002 } }
    }
  ]
}