[inductor] Fix ignored options for torch.compile (#145131)

#139833 broke `torch.compile(options=...)` so that many (all?) options passed in get completely ignored.  @alexreinking pointed this out when `options={"cpu_backend":"halide"}` did nothing.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/145131
Approved by: https://github.com/exclamaforte
This commit is contained in:
Jason Ansel
2025-01-17 16:36:35 -08:00
committed by PyTorch MergeBot
parent 668fb7dfba
commit 4eea2f7496
2 changed files with 28 additions and 2 deletions

View File

@ -2344,7 +2344,7 @@ class _TorchCompileInductorWrapper:
raise RuntimeError(
f"Unexpected type of attr {key}, got {val_type_str} should be {expected_type_str}"
)
self.config[attr_name] = val
self.config[attr_name] = val
def __call__(self, model_, inputs_):
from torch._inductor.compile_fx import compile_fx