|
16 | 16 | from executorch.exir.error import ExportError, ExportErrorType |
17 | 17 | from executorch.exir.lowered_backend_module import LoweredBackendModule |
18 | 18 | from executorch.exir.passes.dim_order_ops_registry import DimOrderOpsMap |
| 19 | +from executorch.exir.passes.executorch_prim_ops_registry import _EXECUTORCH_SYM_OPS |
| 20 | +from executorch.exir.passes.replace_aten_with_edge_pass import DISALLOW_LIST |
19 | 21 | from executorch.exir.verification.arg_validator import ( |
20 | 22 | EdgeOpArgValidator, |
21 | 23 | RunHigherOrderOperatorError, |
@@ -99,16 +101,20 @@ def __init__(self) -> None: |
99 | 101 | self._exception_list = exception_list if exception_list else [] |
100 | 102 |
|
101 | 103 | def _get_exception_list(self) -> List[torch._ops.OpOverload]: |
102 | | - exception_list = [ |
103 | | - torch.ops.aten.mkldnn_rnn_layer.default, |
104 | | - torch.ops.aten._upsample_bilinear2d_aa.default, |
105 | | - torch.ops.aten.quantize_per_tensor.default, |
106 | | - torch.ops.aten.dequantize.self, |
107 | | - torch.ops.aten.max.default, # TODO(T188268054) |
108 | | - torch.ops.aten.min.default, # TODO(T188268054) |
109 | | - torch.ops.aten.full_like.default, # TODO(T183507359) |
110 | | - ] |
111 | | - exception_list += self._exception_list |
| 104 | + exception_list = ( |
| 105 | + [ |
| 106 | + torch.ops.aten.mkldnn_rnn_layer.default, |
| 107 | + torch.ops.aten._upsample_bilinear2d_aa.default, |
| 108 | + torch.ops.aten.quantize_per_tensor.default, |
| 109 | + torch.ops.aten.dequantize.self, |
| 110 | + torch.ops.aten.max.default, # TODO(T188268054) |
| 111 | + torch.ops.aten.min.default, # TODO(T188268054) |
| 112 | + torch.ops.aten.full_like.default, # TODO(T183507359) |
| 113 | + ] |
| 114 | + + list(_EXECUTORCH_SYM_OPS) |
| 115 | + + DISALLOW_LIST |
| 116 | + + self._exception_list |
| 117 | + ) |
112 | 118 |
|
113 | 119 | return exception_list |
114 | 120 |
|
@@ -249,13 +255,9 @@ def check_valid_edge_op(self, op): |
249 | 255 | return |
250 | 256 | if ( |
251 | 257 | op |
252 | | - in [ |
253 | | - operator.getitem, |
254 | | - torch.ops.aten.sym_size.int, |
255 | | - torch.ops.aten.scalar_tensor.default, |
256 | | - torch.ops.aten._assert_async.msg, |
257 | | - torch.ops.aten._assert_scalar.default, |
258 | | - ] |
| 258 | + in [operator.getitem] |
| 259 | + + DISALLOW_LIST |
| 260 | + + list(_EXECUTORCH_SYM_OPS) |
259 | 261 | + self._exception_list |
260 | 262 | ): |
261 | 263 | return |
|
0 commit comments