@@ -31,6 +31,20 @@ def _create_xnnpack_flow() -> TestFlow:
31
31
return _create_xnnpack_flow_base ("xnnpack" )
32
32
33
33
34
+ def _create_xnnpack_dynamic_int8_per_channel_flow () -> TestFlow :
35
+ def create_quantize_stage () -> Quantize :
36
+ qparams = get_symmetric_quantization_config (
37
+ is_per_channel = True , is_dynamic = True
38
+ )
39
+ return XnnpackQuantize (
40
+ quantization_config = qparams ,
41
+ )
42
+
43
+ return _create_xnnpack_flow_base (
44
+ "xnnpack_dynamic_int8_per_channel" , create_quantize_stage
45
+ )
46
+
47
+
34
48
def _create_xnnpack_static_int8_per_channel_flow () -> TestFlow :
35
49
def create_quantize_stage () -> Quantize :
36
50
qparams = get_symmetric_quantization_config (is_per_channel = True )
@@ -43,7 +57,23 @@ def create_quantize_stage() -> Quantize:
43
57
)
44
58
45
59
60
+ def _create_xnnpack_static_int8_per_tensor_flow () -> TestFlow :
61
+ def create_quantize_stage () -> Quantize :
62
+ qparams = get_symmetric_quantization_config (is_per_channel = False )
63
+ return XnnpackQuantize (
64
+ quantization_config = qparams ,
65
+ )
66
+
67
+ return _create_xnnpack_flow_base (
68
+ "xnnpack_static_int8_per_tensor" , create_quantize_stage
69
+ )
70
+
71
+
46
72
XNNPACK_TEST_FLOW = _create_xnnpack_flow ()
73
+ XNNPACK_DYNAMIC_INT8_PER_CHANNEL_TEST_FLOW = (
74
+ _create_xnnpack_dynamic_int8_per_channel_flow ()
75
+ )
47
76
XNNPACK_STATIC_INT8_PER_CHANNEL_TEST_FLOW = (
48
77
_create_xnnpack_static_int8_per_channel_flow ()
49
78
)
79
+ XNNPACK_STATIC_INT8_PER_TENSOR_TEST_FLOW = _create_xnnpack_static_int8_per_tensor_flow ()
0 commit comments