[Performance, Triton] Optimize over mask compute to tl.load in fused_moe_kernel (#1980)
This commit is contained in:
@@ -507,6 +507,12 @@ def _decode_grouped_att_m_fwd(
|
||||
|
||||
num_warps = 4
|
||||
|
||||
extra_kargs = {}
|
||||
if is_hip():
|
||||
# https://rocm.docs.amd.com/en/docs-6.2.0/how-to/llm-fine-tuning-optimization/optimizing-triton-kernel.html
|
||||
# https://github.com/triton-lang/triton/blob/main/third_party/amd/backend/compiler.py
|
||||
extra_kargs = {"waves_per_eu": 4, "matrix_instr_nonkdim": 16, "kpack": 2}
|
||||
|
||||
_fwd_grouped_kernel_stage1[grid](
|
||||
q,
|
||||
k_buffer,
|
||||
@@ -532,6 +538,7 @@ def _decode_grouped_att_m_fwd(
|
||||
num_warps=num_warps,
|
||||
num_stages=1,
|
||||
Lk=Lk,
|
||||
**extra_kargs,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user