Skip to content

Conversation

@Zzz9990
Copy link
Contributor

@Zzz9990 Zzz9990 commented Jan 21, 2026

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@Zzz9990 Zzz9990 changed the title Zan triton mla ps mi355 [MLA] triton mla ps mi355 Jan 21, 2026
Copy link
Contributor

@github-actions github-actions bot left a 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

⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_on is assigned to but never used

mask_on = offs_on < kv_lora_rank


⚠️ [ruff] <F401> reported by reviewdog 🐶
typing.Optional imported but unused

from typing import Optional


⚠️ [ruff] <F401> reported by reviewdog 🐶
functools imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
json imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
torch imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils._triton.arch_info imported but unused

import aiter.ops.triton.utils._triton.arch_info as arch_info


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused

from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.dtypes imported but unused

from aiter import dtypes


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_on is assigned to but never used

mask_on = offs_on < kv_lora_rank


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_k_c is assigned to but never used

mask_k_c = offs_k_c < kv_lora_rank


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_qk_r is assigned to but never used

mask_qk_r = offs_qk_r < (kv_lora_rank + qk_rope_head_dim)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_k_r is assigned to but never used

mask_k_r = offs_k_r < (kv_lora_rank + qk_rope_head_dim)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable shared_v is assigned to but never used

shared_v: gl.constexpr = gl.SwizzledSharedLayout(


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_on is assigned to but never used

mask_on = offs_on < kv_lora_rank


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_k_pe is assigned to but never used

mask_k_pe = mask_k_id < cur_batch_seq_len


⚠️ [ruff] <F401> reported by reviewdog 🐶
typing.Optional imported but unused

from typing import Optional


⚠️ [ruff] <F401> reported by reviewdog 🐶
functools imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton.language imported but unused

import triton.language as tl


⚠️ [ruff] <F401> reported by reviewdog 🐶
torch imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.arch_info imported but unused

import aiter.ops.triton.utils.arch_info as arch_info


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused

from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.pid_preprocessing.remap_xcd imported but unused

from aiter.ops.triton.utils.pid_preprocessing import remap_xcd


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable token_to_batch_end is assigned to but never used

token_to_batch_end = gl.load(work_info_set + work_id * 8 + 6)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable num_q_head_blk is assigned to but never used

num_q_head_blk = gl.cdiv(q_head_num, BLOCK_H)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_k_c is assigned to but never used

mask_k_c = offs_k_c < kv_lora_rank


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable mask_k_r is assigned to but never used

mask_k_r = offs_k_r < (kv_lora_rank + qk_rope_head_dim)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable offs_n is assigned to but never used

offs_n = start_n + gl.arange(0, BLOCK_N,


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable offs_n_pe is assigned to but never used

offs_n_pe = start_n + gl.arange(0, BLOCK_N,


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable LAST_SPLIT is assigned to but never used

LAST_SPLIT = split_kv_end == cur_batch_seq_len


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable k_pe_last_token is assigned to but never used

k_pe_last_token = tl.zeros([BLOCK_R], dtype=q.dtype)


⚠️ [ruff] <E741> reported by reviewdog 🐶
Ambiguous variable name: O


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton.experimental.gluon imported but unused

from triton.experimental import gluon


⚠️ [ruff] <E402> reported by reviewdog 🐶
Module level import not at top of file

from aiter.utility.triton.triton_metadata_redirect import (
AOTMetadataContext,
)


⚠️ [ruff] <F601> reported by reviewdog 🐶
Dictionary key literal (1,) repeated

(1,): [["tt.divisibility", 16]], # kv_indptr


⚠️ [ruff] <F601> reported by reviewdog 🐶
Dictionary key literal (2,) repeated

(2,): [["tt.divisibility", 16]], # kv_indices


⚠️ [ruff] <F601> reported by reviewdog 🐶
Dictionary key literal (1,) repeated

(1,): [["tt.divisibility", 16]], # Att_Out


⚠️ [ruff] <F601> reported by reviewdog 🐶
Dictionary key literal (2,) repeated

(2,): [["tt.divisibility", 16]], # Att_Lse


⚠️ [ruff] <E741> reported by reviewdog 🐶
Ambiguous variable name: O


⚠️ [ruff] <F401> reported by reviewdog 🐶
typing.Optional imported but unused

from typing import Optional


⚠️ [ruff] <F401> reported by reviewdog 🐶
functools imported but unused

import functools


⚠️ [ruff] <F401> reported by reviewdog 🐶
torch imported but unused


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.arch_info imported but unused

import aiter.ops.triton.utils.arch_info as arch_info


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused

from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.pid_preprocessing.remap_xcd imported but unused

from aiter.ops.triton.utils.pid_preprocessing import remap_xcd


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable num_q_head_blk is assigned to but never used

num_q_head_blk = tl.cdiv(q_head_num, BLOCK_H)


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter imported but unused


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable HK is assigned to but never used


⚠️ [ruff] <E741> reported by reviewdog 🐶
Ambiguous variable name: l


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable dtype is assigned to but never used


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable max_seqlen_qo is assigned to but never used

max_seqlen_qo = seq_lens_qo.max().item()


⚠️ [ruff] <F841> reported by reviewdog 🐶
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


⚠️ [ruff] <F541> reported by reviewdog 🐶
f-string without any placeholders

os.system(f"zip -r mla_aot_kernel mla")


⚠️ [ruff] <F821> reported by reviewdog 🐶
Undefined name get_caller_name_no_ext

print_vgpr(fun, get_caller_name_no_ext())


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable us_aiter is assigned to but never used

us_aiter = None


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable S is assigned to but never used

S = kv_indptr[1].item()


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable S is assigned to but never used

S = kv_indptr[1].item()


⚠️ [ruff] <F401> reported by reviewdog 🐶
functools imported but unused

import functools


⚠️ [ruff] <F401> reported by reviewdog 🐶
json imported but unused

import json


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton imported but unused

import triton


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton.language imported but unused

import triton.language as tl


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils._triton.arch_info imported but unused

import aiter.ops.triton.utils._triton.arch_info as arch_info


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused

from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils._triton.pid_preprocessing.remap_xcd imported but unused

from aiter.ops.triton.utils._triton.pid_preprocessing import remap_xcd


⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.dtypes imported but unused

from aiter import dtypes


⚠️ [ruff] <F401> reported by reviewdog 🐶
triton.experimental.gluon.language.amd.cdna4.async_copy imported but unused

from triton.experimental.gluon.language.amd.cdna4 import async_copy as cdna4_async_copy


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable pid is assigned to but never used

pid = gl.program_id(0)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable blocked_b is assigned to but never used

blocked_b: gl.constexpr = gl.DistributedLinearLayout(


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable pid is assigned to but never used

pid = gl.program_id(0)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable blocked_b is assigned to but never used

blocked_b: gl.constexpr = gl.DistributedLinearLayout(


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable blocked_a_mk is assigned to but never used

blocked_a_mk: gl.constexpr = gl.BlockedLayout([4, 8], [2, 32], [4, 1], [1, 0])


⚠️ [ruff] <F821> reported by reviewdog 🐶
Undefined name blocked_ld_in

0, BLOCK_H, layout=gl.SliceLayout(1, blocked_ld_in)


⚠️ [ruff] <F821> reported by reviewdog 🐶
Undefined name blocked_ld_in

0, BLOCK_C, layout=gl.SliceLayout(0, blocked_ld_in)


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable shared_b is assigned to but never used

shared_b: gl.constexpr = gl.PaddedSharedLayout(


⚠️ [ruff] <F821> reported by reviewdog 🐶
Undefined name shared_in

K_Buffer.type.element_ty, [BLOCK_H * 4, BLOCK_C], layout=shared_in


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable H is assigned to but never used

H = 8


⚠️ [ruff] <F841> reported by reviewdog 🐶
Local variable C is assigned to but never used

C = A @ B.T

Comment on lines +26 to +27
from typing import Optional
import functools
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
typing.Optional imported but unused

Suggested change
from typing import Optional
import functools
import functools

Comment on lines +27 to +28
import functools
import json
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
functools imported but unused

Suggested change
import functools
import json
import json

Comment on lines +28 to +29
import json
import triton
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
json imported but unused

Suggested change
import json
import triton
import triton

Comment on lines +31 to +32
import torch
import aiter.ops.triton.utils._triton.arch_info as arch_info
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
torch imported but unused

Suggested change
import torch
import aiter.ops.triton.utils._triton.arch_info as arch_info
import aiter.ops.triton.utils._triton.arch_info as arch_info

Comment on lines +32 to +33
import aiter.ops.triton.utils._triton.arch_info as arch_info
from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils._triton.arch_info imported but unused

Suggested change
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

Comment on lines +29 to +30
import triton
import triton.language as tl
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
triton imported but unused

Suggested change
import triton
import triton.language as tl
import triton.language as tl

Comment on lines +31 to +32
import torch
from aiter.ops.triton.activation import _tanh
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
torch imported but unused

Suggested change
import torch
from aiter.ops.triton.activation import _tanh
from aiter.ops.triton.activation import _tanh

Comment on lines +32 to +33
from aiter.ops.triton.activation import _tanh
import aiter.ops.triton.utils.arch_info as arch_info
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.activation._tanh imported but unused

Suggested change
from aiter.ops.triton.activation import _tanh
import aiter.ops.triton.utils.arch_info as arch_info
import aiter.ops.triton.utils.arch_info as arch_info

Comment on lines +33 to +34
import aiter.ops.triton.utils.arch_info as arch_info
from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.arch_info imported but unused

Suggested change
import aiter.ops.triton.utils.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

Comment on lines +34 to +35
from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH
from aiter.ops.triton.utils.pid_preprocessing import remap_xcd
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [ruff] <F401> reported by reviewdog 🐶
aiter.ops.triton.utils.core.AITER_TRITON_CONFIGS_PATH imported but unused

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants