Skip to content
Open
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
4 changes: 1 addition & 3 deletions src/myvllm/layers/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ def flash_attention_varlen_kernel(
m_i = tl.zeros([BLOCK_M], dtype=tl.float32) - 1e10
acc = tl.zeros([BLOCK_M, head_dim], dtype=tl.float32)

# Number of blocks to process
num_blocks = tl.cdiv(seq_len, BLOCK_N)

# Loop over K, V blocks
for block_n in range(num_blocks):
for block_n in range(start_m + 1):
start_n = block_n * BLOCK_N
offs_n = start_n + tl.arange(0, BLOCK_N)

Expand Down