We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0985c5f commit 71a9f39Copy full SHA for 71a9f39
neural_compressor/adaptor/onnxrt.py
@@ -127,7 +127,9 @@ def __init__(self, framework_specific_info):
127
128
self.work_space = framework_specific_info["workspace_path"]
129
self.reduce_range = (
130
- framework_specific_info["reduce_range"] if "reduce_range" in framework_specific_info else not CpuInfo().vnni
+ framework_specific_info["reduce_range"]
131
+ if framework_specific_info.get("reduce_range", None) is not None
132
+ else not CpuInfo().vnni
133
)
134
self.benchmark = GLOBAL_STATE.STATE == MODE.BENCHMARK
135
os.makedirs(self.work_space, exist_ok=True)
0 commit comments