8000 Incorporate coalesce analysis in codegen by eellison · Pull Request #153751 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Incorporate coalesce analysis in codegen #153751

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

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
8000
Prev Previous commit
Next Next commit
Update
[ghstack-poisoned]
  • Loading branch information
eellison committed May 16, 2025
commit 948321e67d32739657b1613bcc8ade4a826c02e1
2 changes: 2 additions & 0 deletions test/inductor/test_loop_ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ def forward(permute):
permute = torch.ops.aten.permute.default(arg0_1, [1, 0])

out, code = run_and_get_code(torch.compile(forward), (permute))

self.assertEqual(out, forward(permute))
FileCheck().check("YBLOCK").check("XBLOCK").run(code[0])


Expand Down
3 changes: 2 additions & 1 deletion torch/_inductor/codegen/simd.py
6A96
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def prepare_split_iteration_lengths(
groups: Iterable[sympy.Expr],
lengths: Sequence[Sequence[sympy.Expr]],
reduction_numel: sympy.Expr = sympy.S.One,
) -> Sequence[Sequence[sympy.Expr]]::
) -> Sequence[Sequence[sympy.Expr]]:
"Fill in the reduction numel of lengths if missing"
sizevars = V.graph.sizevars
if len(lengths[1]) == 0 and (
Expand Down Expand Up @@ -2130,6 +2130,7 @@ def process_node_vars(
)

# TODO, add tests, reduction splits if config.triton.tile_reductions
# TODO: we should ignore tiny increases in score for extra splits
overlapping_iter_vars = (
all_iter_vars & coalesce_analysis.coalesced_by_var.keys()
)
Expand Down
Loading
0