diff --git a/CNN-examples/quark_quantization/README.md b/CNN-examples/quark_quantization/README.md index 41895720..d57c6e4d 100644 --- a/CNN-examples/quark_quantization/README.md +++ b/CNN-examples/quark_quantization/README.md @@ -197,8 +197,8 @@ cache_dir = Path(__file__).parent.resolve() print(cache_dir) provider_options = [{ 'config_file': 'vaip_config.json', - 'cacheDir': str(cache_dir), - 'cacheKey': 'modelcachekey' + 'cache_dir': str(cache_dir), + 'cache_key': 'modelcachekey' }] session = ort.InferenceSession(quant_model.SerializeToString(), providers=provider, @@ -234,4 +234,3 @@ Advancted Quantization Tools ---------------------------- While the default quantization configurations work well for many popular models, more sophisticated models might experience a decline in accuracy due to errors introduced during the quantization process. To address this, Quark APIs offer advanced tools to help recover lost accuracy. Some of these tools are highlighted in the [Advanced Quantization Tools](../docs/advanced_quant_readme.md) tutorial. - diff --git a/CNN-examples/quark_quantization/quark_quantize.py b/CNN-examples/quark_quantization/quark_quantize.py index aaf53cbe..512c915b 100644 --- a/CNN-examples/quark_quantization/quark_quantize.py +++ b/CNN-examples/quark_quantization/quark_quantize.py @@ -106,16 +106,17 @@ def main(args): provider = ['VitisAIExecutionProvider'] cache_dir = Path(__file__).parent.resolve() provider_options = [{ - 'cacheDir': str(cache_dir), - 'cacheKey': 'modelcachekey', - 'enable_cache_file_io_in_mem':'0' - }] + 'cache_dir': str(cache_dir), + 'cache_key': 'modelcachekey', + 'enable_cache_file_io_in_mem': '0' + }] # Create session options session_options = ort.SessionOptions() session_options.log_severity_level = 1 # 0=Verbose, 1=Info, 2=Warning, 3=Error, 4=Fatal # For PHX/HPT, xclbin is required if npu_device == 'PHX/HPT': provider_options[0]['target'] = 'X1' + provider_options[0]['xlnx_enable_py3_round'] = 0 provider_options[0]['xclbin'] = get_xclbin(npu_device) session = ort.InferenceSession(quant_model.SerializeToString(), sess_options=session_options,