Skip to content

[Bugfix] Guard spec decode slot mapping padding rows - #45005

Open
ashishpatel26 wants to merge 2 commits into
vllm-project:mainfrom
ashishpatel26:contrib/issue-40756-specdecode-padding
Open

ashishpatel26 wants to merge 2 commits into
vllm-project:mainfrom
ashishpatel26:contrib/issue-40756-specdecode-padding

Conversation

@ashishpatel26

Copy link
Copy Markdown
Contributor

Summary

Refs #40756 and #39295.

Guard the fused EAGLE/MTP draft-step slot-mapping kernel against inactive
padding rows with seq_lens == 0. These rows can carry block_table entries of
-1; advancing them as real requests can produce invalid slot mappings and
surface later as CUDA illegal memory access/device-side asserts in speculative
decoding.

This change returns early for those rows, writes PADDING_SLOT_ID, and leaves
their sequence length at zero. It also adds a regression test that creates a
zero-length row with a -1 block table.

Duplicate-work check

Tests

.venv/bin/ruff check vllm/v1/spec_decode/utils.py tests/v1/spec_decode/test_eagle_step_kernel.py
# All checks passed

.venv/bin/ruff format --check vllm/v1/spec_decode/utils.py tests/v1/spec_decode/test_eagle_step_kernel.py
# 2 files already formatted

.venv/bin/python -m py_compile vllm/v1/spec_decode/utils.py tests/v1/spec_decode/test_eagle_step_kernel.py
# passed

git diff --check -- vllm/v1/spec_decode/utils.py tests/v1/spec_decode/test_eagle_step_kernel.py
# passed

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/python -m pytest tests/v1/spec_decode/test_eagle_step_kernel.py -q
# 1 skipped, 16 warnings

The targeted pytest is a Triton GPU kernel test and was skipped locally because
CUDA/XPU is not available in this environment.

AI assistance disclosure

This change was prepared with AI assistance from OpenAI Codex. The submitter
should review the two changed files and validate the GPU kernel test in a CUDA
environment before merge.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@ashishpatel26
ashishpatel26 force-pushed the contrib/issue-40756-specdecode-padding branch from e63d0d9 to 8f96098 Compare June 12, 2026 11:08
@ashishpatel26

Copy link
Copy Markdown
Contributor Author

👋 Hi maintainers — could someone please add the ready label to trigger CI? This contributor account has no merged PRs in vllm-project/vllm yet, so the pre-run-check gate requires a maintainer label. Fix reviewed locally, tests pass, DCO signed. Thank you!

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions Bot added the stale Over 90 days of inactivity label Sep 11, 2026
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: ashishpatel26 <shriganesh.patel@gmail.com>
@ashishpatel26
ashishpatel26 force-pushed the contrib/issue-40756-specdecode-padding branch from 8f96098 to c3920f7 Compare September 17, 2026 12:10
@ashishpatel26

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main (no conflicts). Fix and test still apply cleanly. Still waiting on the ready label to trigger CI — contributor account has no merged PRs yet, so the pre-run-check gate blocks CI without a maintainer label. Happy to address any review feedback.

@github-actions github-actions Bot added unstale Recieved activity after being labelled stale and removed stale Over 90 days of inactivity labels Sep 19, 2026

This branch has not been deployed

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

Labels

bug Something isn't working speculative-decoding unstale Recieved activity after being labelled stale v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant