From 11948b4596cb98ecfd373f12f70b748e98b9efd4 Mon Sep 17 00:00:00 2001 From: peterjc123 Date: Mon, 30 Sep 2024 11:18:30 +0800 Subject: [PATCH] [converter] skip hybrid_quantize_weight_type check for non hybrid quantization (#362) --- tinynn/converter/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinynn/converter/base.py b/tinynn/converter/base.py index c7301d97..17fa80da 100644 --- a/tinynn/converter/base.py +++ b/tinynn/converter/base.py @@ -214,7 +214,8 @@ def __init__( elif hybrid_quantize_weight_type == 'int8': self.hybrid_q_type = np.int8 elif hybrid_quantize_weight_type == 'int16': - raise AttributeError('Hybrid kernels supports int8 and uint8 only') + if self.hybrid: + raise AttributeError('Hybrid kernels supports int8 and uint8 only') if dump_config_path and not dump_jit_model_path: raise AssertionError("when dump_config_path is set, dump_jit_model_path is required to be set")