8000 AOTI freezing: fix test issues and enable by default by benjaminglass1 · Pull Request #149961 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

AOTI freezing: fix test issues and enable by default #149961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: gh/benjaminglass1/79/base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Update
[ghstack-poisoned]
  • Loading branch information
benjaminglass1 committed May 16, 2025
commit 5bfee45fbc88ffcc0dbe89e31f2bcef600c57c11
6 changes: 1 addition & 5 deletions test/inductor/test_aot_inductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4672,11 +4672,7 @@ def forward(self, a, b, c):
so_path, code = run_and_get_cpp_code(
AOTIRunnerUtil.legacy_compile, model, example_inputs
)
is_cpu_freezing = (
config.freezing is None or config.freezing
) and self.device != GPU_TYPE
varname = f"u{int(mark_unbacked) + (2 if is_cpu_freezing else 0)}"
lowerbound_check = f"{varname} >= {1 if mark_unbacked else 2}"
lowerbound_check = f"u{int(mark_unbacked)} >= {1 if mark_unbacked else 2}"
FileCheck().check_count(lowerbound_check, 1).run(code)

compiled = AOTIRunnerUtil.legacy_load(self.device, so_path)
Expand Down
4 changes: 4 additions & 0 deletions torch/_inductor/fx_passes/mkldnn_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,10 @@ def is_const_or_cat_by_const(weight):
if input_meta_value is None or weight_meta_value is None:
return False
batch_size = input_meta_value.shape[0]
# One of our tests attempts to run linear over a zero-element tensor. This is
# not supported by MKLDNN, so refuse to fuse.
if input_meta_value.numel() == 0 or weight_meta_value.numel() == 0:
return False
if (
input_meta_value.dtype == torch.float64
or weight_meta_value.dtype == torch.float64
Expand Down
Loading
0