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

Enabling Hopper optimizations in Triton by default. #252

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 6 additions & 1 deletion jax_triton/triton_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def compile_ttir_to_ptx_inplace(
except RuntimeError as e:
ttgir.dump()
raise ValueError("TTGIR->LLIR pass failed!") from e
shared_mem_bytes = _triton.translation.get_shared_memory_size(ttgir)
shared_mem_bytes = metadata["shared"]
if cuda_options.debug:
print(llir)
ptx = cuda_backend.make_ptx(
Expand Down Expand Up @@ -309,6 +309,10 @@ def get_or_create_triton_kernel(
)
)

context = _triton.ir.context()
_triton.ir.load_dialects(context)
cuda_backend.load_dialects(context)

module = code_gen.ast_to_ttir(
fn,
specialization=tc.ASTSource(
Expand All @@ -318,6 +322,7 @@ def get_or_create_triton_kernel(
attrs=specialization_attr,
),
options=cuda_options,
context=context,
)

ttir = str(module) # `module`` is compiled in-place, so copy TTIR here.
Expand Down