Fix test_mamba_ssm_ssd.py due to missing _query_start_loc_to_chunk_indices_offsets#25995
Fix test_mamba_ssm_ssd.py due to missing _query_start_loc_to_chunk_indices_offsets#25995mgoin merged 1 commit intovllm-project:mainfrom
Conversation
2019c24 to
25a53dc
Compare
tdoublep
left a comment
There was a problem hiding this comment.
Does this test not run as part of CI? Didn't realize it was broken.
| chunk_lens.append(int(take)) | ||
| seq_idx_chunks.append(b) | ||
| last_chunk_indices[b] = len(chunk_lens) - 1 | ||
| pos += take |
There was a problem hiding this comment.
Rather than re-implementing this logic - I think it could be better to refactor the logic into a util function in the meta-data builder and import it (e.g., similarly to how we were doing it for _query_start_loc_to_chunk_indices_offsets).
There was a problem hiding this comment.
thanks @tdoublep !
I moved this helper function to vllm/v1/attention/backends/mamba2_attn.py . Let me know what you think!
Signed-off-by: Huamin Li <3ericli@gmail.com>
Regarding this, from https://github.com/vllm-project/vllm/blob/main/.buildkite/test-pipeline.yaml#L473C10-L480 , my guess is it will run only if changes touch Your PR didn't touch those directories so it didn't get triggered. Let me know if you want to change that, and I am happy to add vllm/v1/attention/backends/mamba2_attn.py into the list! |
mgoin
left a comment
There was a problem hiding this comment.
Looks reasonable and would like to merge to unblock CI, thank you
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com>
…dices_offsets (#25995) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com>
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com>
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com>
…dices_offsets (vllm-project#25995) Signed-off-by: Huamin Li <3ericli@gmail.com>
Purpose
#24683 removed the helper function _query_start_loc_to_chunk_indices_offsets and breaks the tests/kernels/mamba/test_mamba_ssm_ssd.py (sample job https://buildkite.com/vllm/ci/builds/32891/steps/canvas?sid=019998c8-1682-4e2d-8161-55a772c16cde) from v1.attention.backends.mamba2_attn as part of the chunk‑aligned Mamba2 changes. This made tests/kernels/mamba/test_mamba_ssm_ssd.py fail at import time. This patch removes the import and computes the small piece of chunk metadata directly in the test, also providing cu_chunk_seqlens and last_chunk_indices expected by the new kernels. No runtime changes.
This PR
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.