Skip to content

[Hardware][AMD][Bugfix] Fix spec decode acceptance length test#32825

Closed
mawong-amd wants to merge 1 commit intovllm-project:mainfrom
ROCm:fix_spec_decode_acc_length
Closed

[Hardware][AMD][Bugfix] Fix spec decode acceptance length test#32825
mawong-amd wants to merge 1 commit intovllm-project:mainfrom
ROCm:fix_spec_decode_acc_length

Conversation

@mawong-amd
Copy link
Contributor

@mawong-amd mawong-amd commented Jan 22, 2026

Purpose

This PR fixes the speculative decoding acceptance length tests, first implemented in #32030, to run on ROCm.

The current implementation fails because it erroneously calls current_platform.get_valid_backends which is not implemented on non-CUDA platforms. It guards this call behind hasattr(current_platform, "get_valid_backends"), but this does not work because the Platform class implements a __getattr__ method which means hasattr(current_platform, attribute) will trivially always return True for any attribute, even though the value of said attribute may be None.

Test Plan

pytest -sv tests/v1/spec_decode/test_acceptance_length.py on AMD ROCm.

Test Result

The above test passes on MI300X and MI325X.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify
Copy link

mergify bot commented Jan 22, 2026

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @mawong-amd.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added needs-rebase bug Something isn't working labels Jan 22, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces fixes to enable speculative decoding acceptance length tests on ROCm platforms. The key changes include correcting the attention backend detection logic in test_acceptance_length.py by replacing a faulty hasattr check and adding a specific path for ROCm. Additionally, a bug in eagle.py's dummy_run is fixed to correctly handle cases where CUDA graphs are disabled. The changes are logical, well-targeted, and improve compatibility with ROCm. I have reviewed the changes and they look good to me.

@mergify mergify bot removed the needs-rebase label Jan 22, 2026
@mawong-amd mawong-amd force-pushed the fix_spec_decode_acc_length branch from 3a4c5d3 to a39c272 Compare January 22, 2026 02:59
Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com>
@mawong-amd mawong-amd force-pushed the fix_spec_decode_acc_length branch from a39c272 to ec3ec3e Compare January 22, 2026 03:13
@mawong-amd
Copy link
Contributor Author

Closing as a duplicate of #32787

@mawong-amd mawong-amd closed this Jan 22, 2026
@mawong-amd mawong-amd deleted the fix_spec_decode_acc_length branch January 22, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rocm Related to AMD ROCm speculative-decoding v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant