Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

fix bug during parsing dnnl_fpmath env vars #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions torchbenchmark/util/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ def __post__init__(self):
or self.dargs.precision == "amp"
or self.dargs.precision == "int8-static"
or self.dargs.precision == "int8-dynamic"
or os.getenv("DNNL_DEFAULT_FPMATH_MODE").lower() == "any"
or os.getenv("DNNL_DEFAULT_FPMATH_MODE").lower() == "bf16"
or (os.getenv("DNNL_DEFAULT_FPMATH_MODE") != None and
(os.getenv("DNNL_DEFAULT_FPMATH_MODE").lower() == "any" or
os.getenv("DNNL_DEFAULT_FPMATH_MODE").lower() == "bf16"))
or (self.dynamo and self.opt_args.torchdynamo == "fx2trt")
or (not self.dynamo and self.opt_args.fx2trt)
or (not self.dynamo and self.opt_args.use_cosine_similarity)
Expand Down