Skip to content

Commit 71a9f39

Browse files
Fix ut failure for GPU backend (#1712)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0985c5f commit 71a9f39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

neural_compressor/adaptor/onnxrt.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def __init__(self, framework_specific_info):
127127

128128
self.work_space = framework_specific_info["workspace_path"]
129129
self.reduce_range = (
130-
framework_specific_info["reduce_range"] if "reduce_range" in framework_specific_info else not CpuInfo().vnni
130+
framework_specific_info["reduce_range"]
131+
if framework_specific_info.get("reduce_range", None) is not None
132+
else not CpuInfo().vnni
131133
)
132134
self.benchmark = GLOBAL_STATE.STATE == MODE.BENCHMARK
133135
os.makedirs(self.work_space, exist_ok=True)

0 commit comments

Comments
 (0)