Skip to content
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

[AMD] Enable the loop unroller. #4773

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 0 additions & 6 deletions python/test/unit/language/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5635,12 +5635,6 @@ def _kernel(dst, unroll_factor: tl.constexpr):
tl.atomic_add(dst + pid, i + pid)

def check_loop_unroll_count(ir, opStr, loop_unroll_factor):

# Loop unrolling pass only working on Nvidia backend at the moment
if not is_cuda():
assert f'tt.loop_unroll_factor = {loop_unroll_factor}' in ir
return

for line in ir.splitlines():
if opStr in line:
loop_unroll_factor = loop_unroll_factor - 1
Expand Down
1 change: 1 addition & 0 deletions third_party/amd/backend/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def make_ttir(mod, metadata, options):
passes.common.add_cse(pm)
passes.common.add_licm(pm)
passes.common.add_symbol_dce(pm)
passes.ttir.add_loop_unroll(pm)
pm.run(mod)
return mod

Expand Down
Loading