Skip to content

Commit

Permalink
Fix ut failure for GPU backend (#1712)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
mengniwang95 and pre-commit-ci[bot] authored Apr 9, 2024
1 parent 0985c5f commit 71a9f39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neural_compressor/adaptor/onnxrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def __init__(self, framework_specific_info):

self.work_space = framework_specific_info["workspace_path"]
self.reduce_range = (
framework_specific_info["reduce_range"] if "reduce_range" in framework_specific_info else not CpuInfo().vnni
framework_specific_info["reduce_range"]
if framework_specific_info.get("reduce_range", None) is not None
else not CpuInfo().vnni
)
self.benchmark = GLOBAL_STATE.STATE == MODE.BENCHMARK
os.makedirs(self.work_space, exist_ok=True)
Expand Down

0 comments on commit 71a9f39

Please sign in to comment.