File size: 8,919 Bytes
5bb14c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
218
219
220
221
{
  "op": "ai.onnx.Constant",
  "cases": [
    {
      "name": "ort_multivalue_constant_floats",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc",
        "test": "ConstantOpTest.MultiValueConstant_floats"
      },
      "attrs": { "value_floats": [0, 1, 2, 3] },
      "inputs": {},
      "outputs": { "output": { "dtype": "float32", "shape": [4], "tolerance": 0 } }
    },
    {
      "name": "f32_subnormal_literal_values",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc",
        "test": "ConstantOpTest.MultiValueConstant_floats",
        "notes": "A Constant node with explicit finite subnormal float payloads should materialize those bit patterns without arithmetic."
      },
      "attrs": { "value": { "dtype": "float32", "shape": [4], "values": [1e-40, -1e-40, 4e-39, -4e-39] } },
      "inputs": {},
      "outputs": {
        "output": {
          "dtype": "float32",
          "shape": [4],
          "tolerance": 0,
          "data": { "kind": "values", "values": [1e-40, -1e-40, 4e-39, -4e-39] }
        }
      }
    },
    {
      "name": "ort_multivalue_constant_ints_int32",
      "provenance": {
        "source": "onnxruntime/test/providers/cpu/tensor/constant_test.cc",
        "test": "ConstantOpTest.MultiValueConstant_ints",
        "notes": "Native int32 projection of ORT's int64 value_ints shape/value coverage."
      },
      "attrs": { "value": { "dtype": "int32", "shape": [4], "values": [0, 1, 2, 3] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "int32", "shape": [4], "tolerance": 0 } }
    },
    {
      "name": "literal_i32_mixed_exact_values",
      "attrs": { "value": { "dtype": "int32", "shape": [2, 2], "values": [-123456789, -1, 0, 16777217] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_u32_exact_values",
      "attrs": { "value": { "dtype": "uint32", "shape": [2, 2], "values": [0, 1, 16777217, 4000000000] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "uint32", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_int8_edge_values",
      "attrs": { "value": { "dtype": "int8", "shape": [2, 2], "values": [-128, -1, 0, 127] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "int8", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_uint8_edge_values",
      "attrs": { "value": { "dtype": "uint8", "shape": [2, 2], "values": [0, 1, 254, 255] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "uint8", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_int16_edge_values",
      "provenance": {
        "source": "onnx/onnx/docs/Operators.md#Constant-24",
        "notes": "Covers the complete signed int16 range through Constant's literal-value path."
      },
      "attrs": { "value": { "dtype": "int16", "shape": [2, 2], "values": [-32768, -1, 0, 32767] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "int16", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_bool_values",
      "provenance": {
        "source": "onnx/onnx/docs/Operators.md#Constant-24",
        "notes": "ONNX bool tensor payloads use the repository's canonical widened 0/1 representation."
      },
      "attrs": { "value": { "dtype": "bool", "shape": [2, 2], "values": [0, 1, 1, 0] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "bool", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "literal_f16_values",
      "attrs": { "value": { "dtype": "float16", "shape": [4], "values": [-2, -0.5, 0.25, 3.5] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "float16", "shape": [4], "tolerance": 0.001 } }
    },
    {
      "name": "fill_f32_scalar_attr",
      "attrs": { "value_float": -2.5 },
      "inputs": {},
      "outputs": { "output": { "dtype": "float32", "shape": [] } }
    },
    {
      "name": "fill_uint32_scalar_attr",
      "attrs": { "value": { "dtype": "uint32", "shape": [4], "values": [7, 7, 7, 7] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "uint32", "shape": [4] } }
    },
    {
      "name": "fill_f16_scalar_attr",
      "attrs": { "value": { "dtype": "float16", "shape": [2, 2], "values": [1.25, 1.25, 1.25, 1.25] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "float16", "shape": [2, 2] } },
      "tolerance": 0.001
    },
    {
      "name": "fill_int8_negative_scalar_attr",
      "attrs": { "value": { "dtype": "int8", "shape": [2, 3], "values": [-128, -128, -128, -128, -128, -128] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "int8", "shape": [2, 3], "tolerance": 0 } }
    },
    {
      "name": "fill_uint8_high_scalar_attr",
      "attrs": { "value": { "dtype": "uint8", "shape": [2, 3], "values": [250, 250, 250, 250, 250, 250] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "uint8", "shape": [2, 3], "tolerance": 0 } }
    },
    {
      "name": "fill_int16_min_scalar_attr",
      "provenance": {
        "source": "onnx/onnx/docs/Operators.md#Constant-24",
        "notes": "Exercises the scalar-fill path at the signed int16 minimum."
      },
      "attrs": {
        "value": { "dtype": "int16", "shape": [2, 3], "values": [-32768, -32768, -32768, -32768, -32768, -32768] }
      },
      "inputs": {},
      "outputs": { "output": { "dtype": "int16", "shape": [2, 3], "tolerance": 0 } }
    },
    {
      "name": "fill_bool_true_scalar_attr",
      "provenance": {
        "source": "onnxruntime/test/framework/function_test.cc",
        "test": "Constant <value = bool {1}>",
        "notes": "Exercises the scalar-fill path for a true ONNX bool constant."
      },
      "attrs": { "value": { "dtype": "bool", "shape": [2, 3], "values": [1, 1, 1, 1, 1, 1] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "bool", "shape": [2, 3], "tolerance": 0 } }
    },
    {
      "name": "fill_i32_negative_exact",
      "attrs": {
        "value": { "dtype": "int32", "shape": [2, 2], "values": [-123456789, -123456789, -123456789, -123456789] }
      },
      "inputs": {},
      "outputs": { "output": { "dtype": "int32", "shape": [2, 2], "tolerance": 0 } }
    },
    {
      "name": "fill_u32_exact_above_float24",
      "attrs": { "value": { "dtype": "uint32", "shape": [3], "values": [16777217, 16777217, 16777217] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "uint32", "shape": [3], "tolerance": 0 } }
    },
    {
      "name": "fill_rank0_scalar_output",
      "attrs": { "value_float": -3.75 },
      "inputs": {},
      "outputs": { "output": { "dtype": "float32", "shape": [], "tolerance": 0.000001 } }
    },
    {
      "name": "fill_zero_sized_output_noop",
      "attrs": { "value": { "dtype": "float32", "shape": [2, 0, 3], "values": [] } },
      "inputs": {},
      "outputs": { "output": { "dtype": "float32", "shape": [2, 0, 3], "tolerance": 0 } }
    },
    {
      "name": "onnx_backend_constant",
      "provenance": { "source": "cmake/external/onnx/onnx/backend/test/data/node/test_constant" },
      "attrs": {
        "value": {
          "dtype": "float32",
          "shape": [5, 5],
          "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]
        }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [5, 5], "tolerance": 0 } }
    },
    {
      "name": "fill_float_positive_infinity",
      "attrs": { "value_float": "Infinity" },
      "inputs": {},
      "outputs": {
        "output": {
          "dtype": "float32",
          "shape": [],
          "tolerance": 0,
          "data": { "kind": "values", "values": ["Infinity"] }
        }
      }
    },
    {
      "name": "fill_float_negative_infinity",
      "attrs": { "value_float": "-Infinity" },
      "inputs": {},
      "outputs": {
        "output": {
          "dtype": "float32",
          "shape": [],
          "tolerance": 0,
          "data": { "kind": "values", "values": ["-Infinity"] }
        }
      }
    },
    {
      "name": "literal_values_dispatch_cliff_large_f32",
      "attrs": {
        "value_floats": [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8]
      },
      "inputs": {},
      "outputs": { "output": { "dtype": "float32", "shape": [32], "tolerance": 0 } }
    }
  ]
}