2828 "quantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
2929)
3030
31+ lib .define (
32+ "quantize_per_tensor_asym8s(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
33+ )
34+ lib .define (
35+ "quantize_per_tensor_asym8s.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
36+ )
37+
38+ lib .define (
39+ "quantize_per_tensor_asym8u(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
40+ )
41+ lib .define (
42+ "quantize_per_tensor_asym8u.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
43+ )
44+
45+ lib .define (
46+ "quantize_per_tensor_asym16s(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
47+ )
48+ lib .define (
49+ "quantize_per_tensor_asym16s.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
50+ )
51+
52+ lib .define (
53+ "quantize_per_tensor_asym16u(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
54+ )
55+ lib .define (
56+ "quantize_per_tensor_asym16u.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
57+ )
58+
3159lib .define (
3260 "dequantize_per_tensor(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
3361)
3462lib .define (
3563 "dequantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
3664)
65+ lib .define (
66+ "dequantize_per_tensor_asym8s(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
67+ )
68+ lib .define (
69+ "dequantize_per_tensor_asym8s.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
70+ )
71+ lib .define (
72+ "dequantize_per_tensor_asym8u(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
73+ )
74+ lib .define (
75+ "dequantize_per_tensor_asym8u.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
76+ )
77+ lib .define (
78+ "dequantize_per_tensor_asym16s(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
79+ )
80+ lib .define (
81+ "dequantize_per_tensor_asym16s.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
82+ )
83+ lib .define (
84+ "dequantize_per_tensor_asym16u(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype) -> (Tensor Z)"
85+ )
86+ lib .define (
87+ "dequantize_per_tensor_asym16u.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!)"
88+ )
3789
3890lib .define (
3991 "quantized_layer_norm(Tensor X, Tensor X_scale, Tensor X_zero_point, int[] normalized_shape, Tensor weight, Tensor bias, float eps, float output_scale, int output_zero_point) -> (Tensor Y)"
@@ -554,6 +606,54 @@ def quantize_per_tensor_meta(
554606 return input .new_empty (input .size (), dtype = dtype )
555607
556608
609+ @register_fake ("cadence::quantize_per_tensor_asym8s" )
610+ def quantize_per_tensor_asym8s_meta (
611+ input : torch .Tensor ,
612+ scale : float ,
613+ zero_point : int ,
614+ quant_min : int ,
615+ quant_max : int ,
616+ dtype : torch .dtype ,
617+ ) -> torch .Tensor :
618+ return input .new_empty (input .size (), dtype = dtype )
619+
620+
621+ @register_fake ("cadence::quantize_per_tensor_asym8u" )
622+ def quantize_per_tensor_asym8u_meta (
623+ input : torch .Tensor ,
624+ scale : float ,
625+ zero_point : int ,
626+ quant_min : int ,
627+ quant_max : int ,
628+ dtype : torch .dtype ,
629+ ) -> torch .Tensor :
630+ return input .new_empty (input .size (), dtype = dtype )
631+
632+
633+ @register_fake ("cadence::quantize_per_tensor_asym16s" )
634+ def quantize_per_tensor_asym16s_meta (
635+ input : torch .Tensor ,
636+ scale : float ,
637+ zero_point : int ,
638+ quant_min : int ,
639+ quant_max : int ,
640+ dtype : torch .dtype ,
641+ ) -> torch .Tensor :
642+ return input .new_empty (input .size (), dtype = dtype )
643+
644+
645+ @register_fake ("cadence::quantize_per_tensor_asym16u" )
646+ def quantize_per_tensor_asym16u_meta (
647+ input : torch .Tensor ,
648+ scale : float ,
649+ zero_point : int ,
650+ quant_min : int ,
651+ quant_max : int ,
652+ dtype : torch .dtype ,
653+ ) -> torch .Tensor :
654+ return input .new_empty (input .size (), dtype = dtype )
655+
656+
557657@register_fake ("cadence::dequantize_per_tensor" )
558658def dequantize_per_tensor_meta (
559659 input : torch .Tensor ,
@@ -566,6 +666,54 @@ def dequantize_per_tensor_meta(
566666 return input .new_empty (input .size (), dtype = torch .float )
567667
568668
669+ @register_fake ("cadence::dequantize_per_tensor_asym8s" )
670+ def dequantize_per_tensor_asym8s_meta (
671+ input : torch .Tensor ,
672+ scale : float ,
673+ zero_point : int ,
674+ quant_min : int ,
675+ quant_max : int ,
676+ dtype : torch .dtype ,
677+ ) -> torch .Tensor :
678+ return input .new_empty (input .size (), dtype = torch .float )
679+
680+
681+ @register_fake ("cadence::dequantize_per_tensor_asym8u" )
682+ def dequantize_per_tensor_asym8u_meta (
683+ input : torch .Tensor ,
684+ scale : float ,
685+ zero_point : int ,
686+ quant_min : int ,
687+ quant_max : int ,
688+ dtype : torch .dtype ,
689+ ) -> torch .Tensor :
690+ return input .new_empty (input .size (), dtype = torch .float )
691+
692+
693+ @register_fake ("cadence::dequantize_per_tensor_asym16s" )
694+ def dequantize_per_tensor_asym16s_meta (
695+ input : torch .Tensor ,
696+ scale : float ,
697+ zero_point : int ,
698+ quant_min : int ,
699+ quant_max : int ,
700+ dtype : torch .dtype ,
701+ ) -> torch .Tensor :
702+ return input .new_empty (input .size (), dtype = torch .float )
703+
704+
705+ @register_fake ("cadence::dequantize_per_tensor_asym16u" )
706+ def dequantize_per_tensor_asym16u_meta (
707+ input : torch .Tensor ,
708+ scale : float ,
709+ zero_point : int ,
710+ quant_min : int ,
711+ quant_max : int ,
712+ dtype : torch .dtype ,
713+ ) -> torch .Tensor :
714+ return input .new_empty (input .size (), dtype = torch .float )
715+
716+
569717@register_fake ("cadence::quantized_add" )
570718def quantized_add_meta (
571719 X : torch .Tensor ,
0 commit comments