Skip to content

Add autotuning for range() unrolling #219

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 1 commit into
base: main
Choose a base branch
from
Open

Add autotuning for range() unrolling #219

wants to merge 1 commit into from

Conversation

oulgen
Copy link
Contributor

@oulgen oulgen commented Jun 24, 2025

Stacked PRs:


Add autotuning for range() unrolling

oulgen added a commit that referenced this pull request Jun 24, 2025
stack-info: PR: #219, branch: oulgen/stack/14
@oulgen oulgen force-pushed the oulgen/stack/14 branch from befee2d to efd7342 Compare June 24, 2025 21:16
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 24, 2025
@oulgen oulgen requested review from jansel, drisspg and yf225 June 24, 2025 21:16
stack-info: PR: #219, branch: oulgen/stack/14
@oulgen oulgen force-pushed the oulgen/stack/14 branch from efd7342 to 3ed3759 Compare June 24, 2025 23:52
Copy link
Contributor

@jansel jansel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be doing it his way or mapping to the unroll flags in upstream Triton?

The upstream unroller can unroll dynamic loops a given number of times. I was thinking maybe the unroll config should be:

unroll_loops : list[int]

where we have one value per loop and can let the autotuner decide how many times to unroll.

@@ -529,6 +529,8 @@ def visit_For(self, node: ast.For) -> None:
)
outputs: LiftTensorArgs | None = None
begin, end = self._extract_tile_begin_end(node)
if (begin is None or isinstance(begin, int)) and isinstance(end, int):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this coming from a Triton requirement? Couldn't re unroll dynamic loops too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants