Skip to content
Merged
Changes from 1 commit
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: 5 additions & 1 deletion atom/model_ops/attentions/triton_mla.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ def __init__(self, model_runner):
kv_lora_rank = hf.kv_lora_rank
num_kv_splits = 4
triton_mla_buffers = {
# int64, not int32: aiter's Triton decode multiplies each KV row id by
# the row stride (576) in the id's own dtype. An int32 offset wraps past
# row 2**31 / 576 = 3,728,270 (block 233,016 of 16 tokens), and the
# decode then reads outside the KV cache.
"triton_block_table": torch.zeros(
self.max_bs,
self.max_num_blocks_per_seq,
dtype=torch.int32,
dtype=torch.int64,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

int64 covers the range that int32 express.

device=self.device,
),
"triton_attn_logits": torch.empty(
Expand Down