[Bugfix]Repeated add modelslim quant_config and bugfix with "enable-piecewise-cuda-graph" on NPU (#17511)
This commit is contained in:
@@ -805,8 +805,11 @@ class ModelConfig:
|
||||
# Parse quantization method from the HF and ModelSlim model config, if available.
|
||||
# Only one function should return config, other should return None.
|
||||
cfg_list = []
|
||||
cfg_list.append(self._parse_quant_hf_config())
|
||||
cfg_list.append(self._find_quant_modelslim_config())
|
||||
hf_config = self._parse_quant_hf_config()
|
||||
modelslim_config = self._find_quant_modelslim_config()
|
||||
quant_config = modelslim_config or hf_config
|
||||
if quant_config is not None:
|
||||
cfg_list.append(quant_config)
|
||||
|
||||
# Filter out None values
|
||||
cfg_list = [item for item in cfg_list if item is not None]
|
||||
|
||||
Reference in New Issue
Block a user