Skip to content

Conversation

@rasmith
Copy link
Contributor

@rasmith rasmith commented Nov 7, 2025

This PR fixes and import error in test_struct_output_generate which was importing get_num_sms from device_info when it should have been arch_info. There was also an assert that should have been applied only for Qwen3 but was being applied to other models.

All tests now pass.

This fixes issue 27844.

FYI, I found no evidence of OOM during the execution of a successful test. If a test fails, then it looks like leakage can occur which can cause the remaining tests to OOM, but this seems like a separate issue.

============================= test session starts ==============================
platform linux -- Python 3.12.12, pytest-8.4.2, pluggy-1.6.0
rootdir: /vllm-upstream
configfile: pyproject.toml
plugins: asyncio-1.2.0, anyio-4.11.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 20 items

tests/v1/entrypoints/llm/test_struct_output_generate.py ................ [ 80%]
.... [100%]

=============================== warnings summary ===============================
:488
:488: DeprecationWarning: builtin type SwigPyPacked has no module attribute

:488
:488: DeprecationWarning: builtin type SwigPyObject has no module attribute

tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output[mistralai/Ministral-8B-Instruct-2410-xgrammar-auto-None]
tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output[mistralai/Ministral-8B-Instruct-2410-guidance-auto-None]
tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output[mistralai/Ministral-8B-Instruct-2410-lm-format-enforcer-auto-None]
tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output[mistralai/Ministral-8B-Instruct-2410-outlines-auto-speculative_config6]
tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output[mistralai/Ministral-8B-Instruct-2410-guidance-auto-speculative_config7]
tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output_auto_mode[mistralai/Ministral-8B-Instruct-2410-auto]
/vllm-upstream/vllm/transformers_utils/tokenizer.py:287: FutureWarning: It is strongly recommended to run mistral models with --tokenizer-mode "mistral" to ensure correct encoding and decoding.
return get_tokenizer(

tests/v1/entrypoints/llm/test_struct_output_generate.py::test_structured_output_with_structural_tag[xgrammar]
/vllm-upstream/tests/v1/entrypoints/llm/test_struct_output_generate.py:899: DeprecationWarning: guided_decoding is deprecated. This will be removed in v0.12.0 or v1.0.0, which ever is soonest. Please use structured_outputs instead.
sampling_params = SamplingParams(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 20 passed, 9 warnings in 762.31s (0:12:42) ==================

Signed-off-by: Randall Smith <ransmith@amd.com>
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 correctly addresses two issues: an import error in rocm_aiter_fa.py and an overly strict assertion in test_struct_output_generate.py. The change in rocm_aiter_fa.py corrects the import path for get_num_sms. The modification in test_struct_output_generate.py makes the assertion for content conditional on the model name, which aligns with the intended testing logic. The changes are well-implemented and resolve the described bugs. I have no further comments.

Randall Smith and others added 2 commits November 7, 2025 12:09
Signed-off-by: Randall Smith <ransmith@amd.com>
@micah-wil
Copy link
Contributor

AITER main has get_num_sms in aiter.ops.triton.utils.device_info which is why it is imported as such (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils). Also, in AITER main, arch_info.py was moved to aiter.ops.triton.utils._triton (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils/_triton) and get_num_sms no longer lives there. So it seems like this import will fail depending on what AITER commit you are using

@rasmith
Copy link
Contributor Author

rasmith commented Nov 10, 2025

AITER main has get_num_sms in aiter.ops.triton.utils.device_info which is why it is imported as such (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils). Also, in AITER main, arch_info.py was moved to aiter.ops.triton.utils._triton (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils/_triton) and get_num_sms no longer lives there. So it seems like this import will fail depending on what AITER commit you are using

It doesn't match what vLLM is currently installing. When I looked at what was actually installed, this was the correct import.

@micah-wil
Copy link
Contributor

AITER main has get_num_sms in aiter.ops.triton.utils.device_info which is why it is imported as such (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils). Also, in AITER main, arch_info.py was moved to aiter.ops.triton.utils._triton (https://github.com/ROCm/aiter/tree/main/aiter/ops/triton/utils/_triton) and get_num_sms no longer lives there. So it seems like this import will fail depending on what AITER commit you are using

It doesn't match what vLLM is currently installing. When I looked at what was actually installed, this was the correct import.

Yep the AITER commit in the base dockerfile is slightly old now, just adding the context here for anyone playing around with newer AITER commits.

@zhewenl
Copy link
Collaborator

zhewenl commented Nov 10, 2025

@rasmith : The OOM issue can be reproducible if you run pytest -v -s v1/entrypoints to test all the tests (same behavior in what we do in CI)

https://github.com/vllm-project/vllm/blob/main/.buildkite/test-amd.yaml#L328

@heheda12345 heheda12345 requested a review from tjtanaa November 11, 2025 08:03
@heheda12345 heheda12345 changed the title [BugFix][CI/Build] Fix import error and apply assert in appropriate case in test_struct_output_generate [BugFix][CI/Build][ROCM] Fix import error and apply assert in appropriate case in test_struct_output_generate Nov 11, 2025
@mergify
Copy link

mergify bot commented Nov 11, 2025

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

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

@mergify mergify bot added rocm Related to AMD ROCm needs-rebase labels Nov 11, 2025
Signed-off-by: Randall Smith <ransmith@amd.com>
@mergify mergify bot removed the needs-rebase label Nov 11, 2025
Signed-off-by: Randall Smith <ransmith@amd.com>
rasmith and others added 2 commits November 12, 2025 23:35
Signed-off-by: Randall Smith <ransmith@amd.com>
@mergify
Copy link

mergify bot commented Nov 13, 2025

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

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

@mergify mergify bot added the needs-rebase label Nov 13, 2025
@tjtanaa
Copy link
Collaborator

tjtanaa commented Nov 13, 2025

@rasmith Can you rebase this as well?

Signed-off-by: Randall Smith <ransmith@amd.com>
@mergify mergify bot removed the needs-rebase label Nov 13, 2025
@tjtanaa tjtanaa added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 14, 2025
@tjtanaa tjtanaa merged commit 9310357 into vllm-project:main Nov 14, 2025
20 checks passed
ernie-chang pushed a commit to ernie-chang/vllm that referenced this pull request Nov 14, 2025
…iate case in test_struct_output_generate (vllm-project#28311)

Signed-off-by: Randall Smith <ransmith@amd.com>
Co-authored-by: Randall Smith <ransmith@amd.com>
Signed-off-by: ernie-chang <ernie.chang@cienet.com>
geodavic pushed a commit to geodavic/vllm that referenced this pull request Nov 16, 2025
…iate case in test_struct_output_generate (vllm-project#28311)

Signed-off-by: Randall Smith <ransmith@amd.com>
Co-authored-by: Randall Smith <ransmith@amd.com>
Signed-off-by: George D. Torres <gdavtor@gmail.com>
bwasti pushed a commit to bwasti/vllm that referenced this pull request Nov 17, 2025
…iate case in test_struct_output_generate (vllm-project#28311)

Signed-off-by: Randall Smith <ransmith@amd.com>
Co-authored-by: Randall Smith <ransmith@amd.com>
Signed-off-by: Bram Wasti <bwasti@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm structured-output v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[CI Failure]: AMD structured outputs tests OOM with @pytest.mark.skip_global_cleanup

6 participants