Commit ec52125
authored
Add complex dtype support to edge dialect for specific ops (#20828)
The edge dialect dtype constraint tables did not include complex dtypes
(ComplexFloat, ComplexDouble), causing the verifier to incorrectly
reject models that use complex tensors. The runtime already supports
these types (scalar_type.h indices 9-10).
Registers ComplexFloat and ComplexDouble as recognized dtype names and
adds them to the following shape-manipulation ops that are
dtype-agnostic: unsqueeze_copy, squeeze_copy, permute_copy,
slice_copy, expand_copy.
This was forcing downstream exporters to monkey-patch
_check_tensor_args_matching_op_allowed_dtype to suppress
SpecViolationError for complex dtype violations.1 parent aceeb40 commit ec52125
3 files changed
Lines changed: 59 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3777 | 3777 | | |
3778 | 3778 | | |
3779 | 3779 | | |
3780 | | - | |
| 3780 | + | |
3781 | 3781 | | |
3782 | 3782 | | |
3783 | 3783 | | |
| |||
6523 | 6523 | | |
6524 | 6524 | | |
6525 | 6525 | | |
6526 | | - | |
| 6526 | + | |
6527 | 6527 | | |
6528 | 6528 | | |
6529 | 6529 | | |
| |||
7185 | 7185 | | |
7186 | 7186 | | |
7187 | 7187 | | |
7188 | | - | |
| 7188 | + | |
7189 | 7189 | | |
7190 | 7190 | | |
7191 | 7191 | | |
| |||
7272 | 7272 | | |
7273 | 7273 | | |
7274 | 7274 | | |
7275 | | - | |
| 7275 | + | |
7276 | 7276 | | |
7277 | 7277 | | |
7278 | 7278 | | |
| |||
7281 | 7281 | | |
7282 | 7282 | | |
7283 | 7283 | | |
7284 | | - | |
| 7284 | + | |
7285 | 7285 | | |
7286 | 7286 | | |
7287 | 7287 | | |
| |||
7821 | 7821 | | |
7822 | 7822 | | |
7823 | 7823 | | |
7824 | | - | |
| 7824 | + | |
7825 | 7825 | | |
7826 | 7826 | | |
7827 | 7827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
0 commit comments