Revert "test fixing benchmarks (#162503)"

This reverts commit 484c4093a87a3e6767e55ed553f95db8fc137442.

Reverted https://github.com/pytorch/pytorch/pull/162503 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it regresses CPU perf smoke test ([comment](https://github.com/pytorch/pytorch/pull/162503#issuecomment-3273554680))
This commit is contained in:
PyTorch MergeBot
2025-09-10 06:55:35 +00:00
parent 833997a6fd
commit e1f0a69943
3 changed files with 6 additions and 19 deletions

View File

@ -1424,7 +1424,7 @@ class AOTInductorModelCache:
torch.hpu.max_memory_allocated() - pre_clone_memory_used
) / 1e9
inductor_configs = {"aot_inductor.package_constants_in_so": False}
inductor_configs = {}
if mode == "max-autotune":
inductor_configs["max_autotune"] = True
ep = torch.export.export(
@ -1439,14 +1439,8 @@ class AOTInductorModelCache:
ep, inductor_configs=inductor_configs
) # type: ignore[arg-type]
compiled = torch._inductor.aoti_load_package(package_path)
compiled.load_constants(
{**ep.state_dict, **ep.constants},
check_full_update=False,
user_managed=True,
)
cls.cache[key] = (
compiled,
torch._inductor.aoti_load_package(package_path),
clone_memory_used,
)