@@ -1806,30 +1806,6 @@ def call_operator(self, op, args, kwargs, meta):
18061806 return super ().call_operator (op , tuple (new_args ), kwargs , meta )
18071807
18081808
1809- @register_cadence_pass (CadencePassAttribute (opt_level = 0 ))
1810- class ReplaceAtenLinalgVectorNormWithCadenceLinalgVectorNormPass (ExportPass ):
1811- """
1812- Replace the aten.linalg_vector_norm op with a custom op.
1813- aten.linalg_vector_norm is not supported by Jarvis, so we
1814- need to replace it with native_batch_norm at all optimization levels.
1815- """
1816-
1817- def call_operator (self , op , args , kwargs , meta ):
1818- if op != exir_ops .edge .aten .linalg_vector_norm .default :
1819- return super ().call_operator (op , args , kwargs , meta )
1820-
1821- assert (
1822- len (args ) == 1
1823- ), "aten.linalg_vector_norm should have 1 argument (a tensor), we do not support any custom variants"
1824-
1825- return super ().call_operator (
1826- exir_ops .edge .cadence .linalg_vector_norm .default ,
1827- args ,
1828- kwargs ,
1829- meta ,
1830- )
1831-
1832-
18331809@register_cadence_pass (CadencePassAttribute (opt_level = 1 ))
18341810class ReplaceSingleElementTensorArgumentsFromFullOpWithScalarPass (ExportPass ):
18351811 """
@@ -2243,7 +2219,6 @@ class CadenceReplaceOpsInGraph:
22432219 ReplacePT2DequantWithCadenceDequantPass ,
22442220 ReplaceSingleElementTensorArgumentsFromFullOpWithScalarPass ,
22452221 ReplaceAtenAvgPoolWithJarvisAvgPoolPass ,
2246- ReplaceAtenLinalgVectorNormWithCadenceLinalgVectorNormPass ,
22472222 ReplaceWhereWithFullArgsWithWhereScalar ,
22482223 # ReplaceGeluWithApproximateGeluPass,
22492224 ]
0 commit comments