@@ -437,7 +437,7 @@ def get_anchors(
437
437
)
438
438
439
439
def replacement_op (self ):
440
- return torch .ops .xtensa .quantized_linear .default
440
+ return torch .ops .cadence .quantized_linear .default
441
441
442
442
443
443
class LinearFunctionalPattern (QuantizationPattern ):
@@ -457,7 +457,7 @@ def get_anchors(
457
457
)
458
458
459
459
def replacement_op (self ):
460
- return torch .ops .xtensa .quantized_linear .default
460
+ return torch .ops .cadence .quantized_linear .default
461
461
462
462
463
463
class LayerNormPattern (QuantizationPattern ):
@@ -476,7 +476,7 @@ def get_anchors(self, gm, fused_partition) -> PartitionAnchors:
476
476
)
477
477
478
478
def replacement_op (self ):
479
- return torch .ops .xtensa .quantized_layer_norm .default
479
+ return torch .ops .cadence .quantized_layer_norm .default
480
480
481
481
482
482
class Conv1dPattern (QuantizationPattern ):
@@ -503,7 +503,7 @@ def get_anchors(
503
503
)
504
504
505
505
def replacement_op (self ):
506
- return torch .ops .xtensa .quantized_conv .default
506
+ return torch .ops .cadence .quantized_conv .default
507
507
508
508
509
509
class Conv2dPattern (QuantizationPattern ):
@@ -530,7 +530,7 @@ def get_anchors(
530
530
)
531
531
532
532
def replacement_op (self ):
533
- return torch .ops .xtensa .quantized_conv .default
533
+ return torch .ops .cadence .quantized_conv .default
534
534
535
535
536
536
class AddmmPattern (QuantizationPattern ):
@@ -550,7 +550,7 @@ def get_anchors(
550
550
)
551
551
552
552
def replacement_op (self ):
553
- return torch .ops .xtensa .quantized_linear .default
553
+ return torch .ops .cadence .quantized_linear .default
554
554
555
555
556
556
class ReluPattern (QuantizationPattern ):
@@ -573,7 +573,7 @@ def get_anchors(
573
573
)
574
574
575
575
def replacement_op (self ):
576
- return torch .ops .xtensa .quantized_relu .default
576
+ return torch .ops .cadence .quantized_relu .default
577
577
578
578
579
579
class GenericQuantizer (Quantizer ):
@@ -823,15 +823,15 @@ def mark_fused(cls, nodes) -> bool:
823
823
824
824
class ReplacePT2QuantWithXtensaQuant (ExportPass ):
825
825
"""
826
- Replace the pt2 quantization ops with custom xtensa quantization ops.
826
+ Replace the pt2 quantization ops with custom cadence quantization ops.
827
827
"""
828
828
829
829
def call_operator (self , op , args , kwargs , meta ):
830
830
if op not in {exir_ops .edge .quantized_decomposed .quantize_per_tensor .default }:
831
831
return super ().call_operator (op , args , kwargs , meta )
832
832
833
833
return super ().call_operator (
834
- exir_ops .edge .xtensa .quantize_per_tensor .default ,
834
+ exir_ops .edge .cadence .quantize_per_tensor .default ,
835
835
args ,
836
836
kwargs ,
837
837
meta ,
@@ -840,15 +840,15 @@ def call_operator(self, op, args, kwargs, meta):
840
840
841
841
class ReplacePT2DequantWithXtensaDequant (ExportPass ):
842
842
"""
843
- Replace the pt2 dequantization ops with custom xtensa dequantization ops.
843
+ Replace the pt2 dequantization ops with custom cadence dequantization ops.
844
844
"""
845
845
846
846
def call_operator (self , op , args , kwargs , meta ):
847
847
if op not in {exir_ops .edge .quantized_decomposed .dequantize_per_tensor .default }:
848
848
return super ().call_operator (op , args , kwargs , meta )
849
849
850
850
return super ().call_operator (
851
- exir_ops .edge .xtensa .dequantize_per_tensor .default ,
851
+ exir_ops .edge .cadence .dequantize_per_tensor .default ,
852
852
args ,
853
853
kwargs ,
854
854
meta ,
0 commit comments