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)"
@@ -517,6 +569,54 @@ def quantize_per_tensor_meta(
517569 return input .new_empty (input .size (), dtype = dtype )
518570
519571
572+ @register_fake ("cadence::quantize_per_tensor_asym8s" )
573+ def quantize_per_tensor_asym8s_meta (
574+ input : torch .Tensor ,
575+ scale : float ,
576+ zero_point : int ,
577+ quant_min : int ,
578+ quant_max : int ,
579+ dtype : torch .dtype ,
580+ ) -> torch .Tensor :
581+ return input .new_empty (input .size (), dtype = dtype )
582+
583+
584+ @register_fake ("cadence::quantize_per_tensor_asym8u" )
585+ def quantize_per_tensor_asym8u_meta (
586+ input : torch .Tensor ,
587+ scale : float ,
588+ zero_point : int ,
589+ quant_min : int ,
590+ quant_max : int ,
591+ dtype : torch .dtype ,
592+ ) -> torch .Tensor :
593+ return input .new_empty (input .size (), dtype = dtype )
594+
595+
596+ @register_fake ("cadence::quantize_per_tensor_asym16s" )
597+ def quantize_per_tensor_asym16s_meta (
598+ input : torch .Tensor ,
599+ scale : float ,
600+ zero_point : int ,
601+ quant_min : int ,
602+ quant_max : int ,
603+ dtype : torch .dtype ,
604+ ) -> torch .Tensor :
605+ return input .new_empty (input .size (), dtype = dtype )
606+
607+
608+ @register_fake ("cadence::quantize_per_tensor_asym16u" )
609+ def quantize_per_tensor_asym16u_meta (
610+ input : torch .Tensor ,
611+ scale : float ,
612+ zero_point : int ,
613+ quant_min : int ,
614+ quant_max : int ,
615+ dtype : torch .dtype ,
616+ ) -> torch .Tensor :
617+ return input .new_empty (input .size (), dtype = dtype )
618+
619+
520620@register_fake ("cadence::dequantize_per_tensor" )
521621def dequantize_per_tensor_meta (
522622 input : torch .Tensor ,
@@ -529,6 +629,54 @@ def dequantize_per_tensor_meta(
529629 return input .new_empty (input .size (), dtype = torch .float )
530630
531631
632+ @register_fake ("cadence::dequantize_per_tensor_asym8s" )
633+ def dequantize_per_tensor_asym8s_meta (
634+ input : torch .Tensor ,
635+ scale : float ,
636+ zero_point : int ,
637+ quant_min : int ,
638+ quant_max : int ,
639+ dtype : torch .dtype ,
640+ ) -> torch .Tensor :
641+ return input .new_empty (input .size (), dtype = torch .float )
642+
643+
644+ @register_fake ("cadence::dequantize_per_tensor_asym8u" )
645+ def dequantize_per_tensor_asym8u_meta (
646+ input : torch .Tensor ,
647+ scale : float ,
648+ zero_point : int ,
649+ quant_min : int ,
650+ quant_max : int ,
651+ dtype : torch .dtype ,
652+ ) -> torch .Tensor :
653+ return input .new_empty (input .size (), dtype = torch .float )
654+
655+
656+ @register_fake ("cadence::dequantize_per_tensor_asym16s" )
657+ def dequantize_per_tensor_asym16s_meta (
658+ input : torch .Tensor ,
659+ scale : float ,
660+ zero_point : int ,
661+ quant_min : int ,
662+ quant_max : int ,
663+ dtype : torch .dtype ,
664+ ) -> torch .Tensor :
665+ return input .new_empty (input .size (), dtype = torch .float )
666+
667+
668+ @register_fake ("cadence::dequantize_per_tensor_asym16u" )
669+ def dequantize_per_tensor_asym16u_meta (
670+ input : torch .Tensor ,
671+ scale : float ,
672+ zero_point : int ,
673+ quant_min : int ,
674+ quant_max : int ,
675+ dtype : torch .dtype ,
676+ ) -> torch .Tensor :
677+ return input .new_empty (input .size (), dtype = torch .float )
678+
679+
532680@register_fake ("cadence::quantized_add" )
533681def quantized_add_meta (
534682 X : torch .Tensor ,
0 commit comments