Skip to content

fix: remove duplicate kv_indptr loop in benchmark#134

Open
yurekami wants to merge 1 commit intodeepseek-ai:mainfrom
yurekami:fix/benchmark-kv-indptr
Open

fix: remove duplicate kv_indptr loop in benchmark#134
yurekami wants to merge 1 commit intodeepseek-ai:mainfrom
yurekami:fix/benchmark-kv-indptr

Conversation

@yurekami
Copy link

Summary

  • Removes duplicate loop that incorrectly extended kv_indptr a second time in run_flash_infer() function
  • The loop at lines 100-101 was iterating over cache_seqlens[1:] and appending to kv_indptr after the main loop (lines 94-99) had already built the complete array
  • This caused kv_indptr to have 2*b elements instead of the correct b+1 elements

Test plan

  • Code review - the duplicate loop was clearly redundant
  • The main loop already handles all batch elements correctly

🤖 Generated with Claude Code

The loop at lines 100-101 incorrectly extended kv_indptr a second time
after the main loop (lines 94-99) had already built the complete array.
This caused kv_indptr to have 2*b elements instead of the correct b+1
elements, leading to incorrect benchmark results for flashinfer comparison.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant