Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
jansel committed Jun 19, 2024
1 parent cf003e9 commit 912ca31
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions benchmarks/dynamo/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3123,6 +3123,12 @@ def parse_args(args=None):
parser.add_argument(
"--freezing", action="store_true", help="turn on freezing", default=False
)
parser.add_argument(
"--inductor-config",
"-c",
action="append",
help="key=value in torch._inductor.config",
)
parser.add_argument(
"--ci", action="store_true", help="Flag to tell that its a CI run"
)
Expand Down Expand Up @@ -4025,6 +4031,18 @@ def run(runner, args, original_dir=None):
inductor_config.triton.divisible_by_16 = not args.disable_divisible_by_16
if args.inference:
inductor_config.freezing = args.freezing
if args.inductor_config:
for config in args.inductor_config:
key, value = config.split("=")
typ = type(inductor_config.__getattr__(key))
if issubclass(typ, bool):
assert value in ("0", "1", "True", "False")
value = value in ("1", "True")
elif issubclass(typ, (str, int, float)):
value = typ(value)
else:
raise NotImplementedError(typ)
inductor_config.__setattr__(key, value)

runner.setup_amp()

Expand Down

0 comments on commit 912ca31

Please sign in to comment.