-
Notifications
You must be signed in to change notification settings - Fork 180
[MLA] triton mla ps mi355 #1884
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
base: main
Are you sure you want to change the base?
Conversation
…nhance_split_alg_inte
…nhance_split_alg_inte
…nhance_split_alg_inte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
ruff
Local variable mask_on is assigned to but never used
| mask_on = offs_on < kv_lora_rank |
typing.Optional imported but unused
| from typing import Optional |
functools imported but unused
| import functools |
json imported but unused
| import json |
triton imported but unused
| import triton |
torch imported but unused
| import torch |
aiter.ops.triton.utils._triton.arch_info imported but unused
| import aiter.ops.triton.utils._triton.arch_info as arch_info |
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
aiter.dtypes imported but unused
| from aiter import dtypes |
Local variable mask_on is assigned to but never used
| mask_on = offs_on < kv_lora_rank |
Local variable mask_k_c is assigned to but never used
| mask_k_c = offs_k_c < kv_lora_rank |
Local variable mask_qk_r is assigned to but never used
| mask_qk_r = offs_qk_r < (kv_lora_rank + qk_rope_head_dim) |
Local variable mask_k_r is assigned to but never used
| mask_k_r = offs_k_r < (kv_lora_rank + qk_rope_head_dim) |
Local variable shared_v is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_mi355.py
Line 1936 in 9d3f8b1
| shared_v: gl.constexpr = gl.SwizzledSharedLayout( |
Local variable mask_on is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_mi355.py
Line 2014 in 9d3f8b1
| mask_on = offs_on < kv_lora_rank |
Local variable mask_k_pe is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_mi355.py
Line 2439 in 9d3f8b1
| mask_k_pe = mask_k_id < cur_batch_seq_len |
typing.Optional imported but unused
| from typing import Optional |
functools imported but unused
| import functools |
triton.language imported but unused
| import triton.language as tl |
torch imported but unused
| import torch |
aiter.ops.triton.utils.arch_info imported but unused
| import aiter.ops.triton.utils.arch_info as arch_info |
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
aiter.ops.triton.utils.pid_preprocessing.remap_xcd imported but unused
| from aiter.ops.triton.utils.pid_preprocessing import remap_xcd |
Local variable token_to_batch_end is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 188 in 9d3f8b1
| token_to_batch_end = gl.load(work_info_set + work_id * 8 + 6) |
Local variable num_q_head_blk is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 190 in 9d3f8b1
| num_q_head_blk = gl.cdiv(q_head_num, BLOCK_H) |
Local variable mask_k_c is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 245 in 9d3f8b1
| mask_k_c = offs_k_c < kv_lora_rank |
Local variable mask_k_r is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 247 in 9d3f8b1
| mask_k_r = offs_k_r < (kv_lora_rank + qk_rope_head_dim) |
Local variable offs_n is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 284 in 9d3f8b1
| offs_n = start_n + gl.arange(0, BLOCK_N, |
Local variable offs_n_pe is assigned to but never used
aiter/aiter/ops/triton/gluon/mla_decode_ps.py
Line 287 in 9d3f8b1
| offs_n_pe = start_n + gl.arange(0, BLOCK_N, |
Local variable LAST_SPLIT is assigned to but never used
aiter/aiter/ops/triton/mla_decode.py
Line 118 in 9d3f8b1
| LAST_SPLIT = split_kv_end == cur_batch_seq_len |
Local variable k_pe_last_token is assigned to but never used
aiter/aiter/ops/triton/mla_decode.py
Line 119 in 9d3f8b1
| k_pe_last_token = tl.zeros([BLOCK_R], dtype=q.dtype) |
Ambiguous variable name: O
aiter/aiter/ops/triton/mla_decode.py
Line 327 in 9d3f8b1
| O, |
triton.experimental.gluon imported but unused
| from triton.experimental import gluon |
Module level import not at top of file
aiter/aiter/ops/triton/mla_decode_dispatch.py
Lines 72 to 74 in 9d3f8b1
| from aiter.utility.triton.triton_metadata_redirect import ( | |
| AOTMetadataContext, | |
| ) |
Dictionary key literal (1,) repeated
aiter/aiter/ops/triton/mla_decode_dispatch.py
Line 183 in 9d3f8b1
| (1,): [["tt.divisibility", 16]], # kv_indptr |
Dictionary key literal (2,) repeated
aiter/aiter/ops/triton/mla_decode_dispatch.py
Line 184 in 9d3f8b1
| (2,): [["tt.divisibility", 16]], # kv_indices |
Dictionary key literal (1,) repeated
aiter/aiter/ops/triton/mla_decode_dispatch.py
Line 185 in 9d3f8b1
| (1,): [["tt.divisibility", 16]], # Att_Out |
Dictionary key literal (2,) repeated
aiter/aiter/ops/triton/mla_decode_dispatch.py
Line 186 in 9d3f8b1
| (2,): [["tt.divisibility", 16]], # Att_Lse |
Ambiguous variable name: O
aiter/aiter/ops/triton/mla_decode_dispatch.py
Line 396 in 9d3f8b1
| O, |
typing.Optional imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 13 in 9d3f8b1
| from typing import Optional |
functools imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 14 in 9d3f8b1
| import functools |
torch imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 17 in 9d3f8b1
| import torch |
aiter.ops.triton.utils.arch_info imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 19 in 9d3f8b1
| import aiter.ops.triton.utils.arch_info as arch_info |
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 20 in 9d3f8b1
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
aiter.ops.triton.utils.pid_preprocessing.remap_xcd imported but unused
aiter/aiter/ops/triton/mla_decode_ps.py
Line 21 in 9d3f8b1
| from aiter.ops.triton.utils.pid_preprocessing import remap_xcd |
Local variable num_q_head_blk is assigned to but never used
aiter/aiter/ops/triton/mla_decode_ps.py
Line 87 in 9d3f8b1
| num_q_head_blk = tl.cdiv(q_head_num, BLOCK_H) |
aiter imported but unused
| import aiter |
Local variable HK is assigned to but never used
| HK = 1 |
Ambiguous variable name: l
| l = attn_weights_exp.sum(-1) |
Local variable dtype is assigned to but never used
| dtype = args.dtype |
Local variable max_seqlen_qo is assigned to but never used
| max_seqlen_qo = seq_lens_qo.max().item() |
Local variable new_k_pe_elems is assigned to but never used
| new_k_pe_elems = qk_rope_head_dim # to add to kv cache |
f-string without any placeholders
| os.system(f"zip -r mla_aot_kernel mla") |
Undefined name get_caller_name_no_ext
| print_vgpr(fun, get_caller_name_no_ext()) |
Local variable us_aiter is assigned to but never used
Line 219 in 9d3f8b1
| us_aiter = None |
Local variable S is assigned to but never used
| S = kv_indptr[1].item() |
Local variable S is assigned to but never used
| S = kv_indptr[1].item() |
functools imported but unused
Line 2 in 9d3f8b1
| import functools |
json imported but unused
Line 3 in 9d3f8b1
| import json |
triton imported but unused
Line 4 in 9d3f8b1
| import triton |
triton.language imported but unused
Line 5 in 9d3f8b1
| import triton.language as tl |
aiter.ops.triton.utils._triton.arch_info imported but unused
Line 7 in 9d3f8b1
| import aiter.ops.triton.utils._triton.arch_info as arch_info |
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused
Line 8 in 9d3f8b1
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
aiter.ops.triton.utils._triton.pid_preprocessing.remap_xcd imported but unused
Line 9 in 9d3f8b1
| from aiter.ops.triton.utils._triton.pid_preprocessing import remap_xcd |
aiter.dtypes imported but unused
Line 10 in 9d3f8b1
| from aiter import dtypes |
triton.experimental.gluon.language.amd.cdna4.async_copy imported but unused
Line 15 in 9d3f8b1
| from triton.experimental.gluon.language.amd.cdna4 import async_copy as cdna4_async_copy |
Local variable pid is assigned to but never used
Line 110 in 9d3f8b1
| pid = gl.program_id(0) |
Local variable blocked_b is assigned to but never used
Line 118 in 9d3f8b1
| blocked_b: gl.constexpr = gl.DistributedLinearLayout( |
Local variable pid is assigned to but never used
Line 342 in 9d3f8b1
| pid = gl.program_id(0) |
Local variable blocked_b is assigned to but never used
Line 351 in 9d3f8b1
| blocked_b: gl.constexpr = gl.DistributedLinearLayout( |
Local variable blocked_a_mk is assigned to but never used
Line 371 in 9d3f8b1
| blocked_a_mk: gl.constexpr = gl.BlockedLayout([4, 8], [2, 32], [4, 1], [1, 0]) |
Undefined name blocked_ld_in
Line 396 in 9d3f8b1
| 0, BLOCK_H, layout=gl.SliceLayout(1, blocked_ld_in) |
Undefined name blocked_ld_in
Line 400 in 9d3f8b1
| 0, BLOCK_C, layout=gl.SliceLayout(0, blocked_ld_in) |
Local variable shared_b is assigned to but never used
Line 410 in 9d3f8b1
| shared_b: gl.constexpr = gl.PaddedSharedLayout( |
Undefined name shared_in
Line 418 in 9d3f8b1
| K_Buffer.type.element_ty, [BLOCK_H * 4, BLOCK_C], layout=shared_in |
Local variable H is assigned to but never used
Line 463 in 9d3f8b1
| H = 8 |
Local variable C is assigned to but never used
Line 473 in 9d3f8b1
| C = A @ B.T |
| from typing import Optional | ||
| import functools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import functools | ||
| import json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import json | ||
| import triton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import torch | ||
| import aiter.ops.triton.utils._triton.arch_info as arch_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import aiter.ops.triton.utils._triton.arch_info as arch_info | ||
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiter.ops.triton.utils._triton.arch_info imported but unused
| import aiter.ops.triton.utils._triton.arch_info as arch_info | |
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH | |
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
| import triton | ||
| import triton.language as tl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import torch | ||
| from aiter.ops.triton.activation import _tanh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from aiter.ops.triton.activation import _tanh | ||
| import aiter.ops.triton.utils.arch_info as arch_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import aiter.ops.triton.utils.arch_info as arch_info | ||
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH | ||
| from aiter.ops.triton.utils.pid_preprocessing import remap_xcd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH | |
| from aiter.ops.triton.utils.pid_preprocessing import remap_xcd | |
| from aiter.ops.triton.utils.pid_preprocessing import remap_xcd |
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist