Skip to content

[ROCm] [CI] Fix diffusion test - #4574

Merged
hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
EmbeddedLLM:fixdiffusion
Jun 20, 2026
Merged

hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
EmbeddedLLM:fixdiffusion

Conversation

@tjtanaa

@tjtanaa tjtanaa commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

PLEASE FILL IN THE PR DESCRIPTION HERE.

Purpose

Fix Diffusion GPU Worker Test
https://buildkite.com/vllm/vllm-omni-amd-ci/builds/8941/list?sid=019edeb5-8b47-4515-810d-ef3d20b13b1c&tab=output

    func = self.__getitem__(name)
           ^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <CDLL '/usr/local/lib/python3.12/dist-packages/tilelang/lib/libcudart_stub.so', handle 16de6880 at 0x7b88ec090da0>
name_or_ordinal = 'hipSetDevice'
    def __getitem__(self, name_or_ordinal):
>       func = self._FuncPtr((name_or_ordinal, self))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: /usr/local/lib/python3.12/dist-packages/tilelang/lib/libcudart_stub.so: undefined symbol: hipSetDevice
/usr/lib/python3.12/ctypes/__init__.py:397: AttributeError
________ ERROR at setup of TestDiffusionWorkerSleep.test_sleep_level_2 _________
self = <test_diffusion_worker.TestDiffusionWorkerSleep object at 0x7b99413184d0>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7b88ec091be0>
    @pytest.fixture(autouse=True)
    def setup_allocator(self, mocker: MockerFixture):
        """
        Unified interception of Allocators, and provision of default security values.
        """
>       self.mock_allocator_class = mocker.patch("vllm.device_allocator.cumem.CuMemAllocator")
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Test Plan

test-ready.yaml: https://buildkite.com/vllm/vllm-omni-amd-ci/builds/8942/list

The same test command is run on test-merge.yaml, so only test-ready.yaml results is sufficient.

vLLM Version:

vLLM-Omni Commit:

Test Result

BEFORE SUBMITTING: read CONTRIBUTING.md and run the precheck-pr skill with the code agent for a self-check against project conventions.
(anything written below this line will be removed by GitHub Actions)

tjtanaa added 6 commits June 12, 2026 08:25
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
@hsliuustc0106 hsliuustc0106 added the ready label to trigger buildkite CI label Jun 19, 2026

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Test-only fix looks correct. The _get_cumem_allocator_class() wrapper prevents hipSetDevice errors on ROCm by deferring the CuMemAllocator import. All CI checks pass.

return vllm_config


def _get_cumem_allocator_class() -> type:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good: Lazy import wrapper prevents hipSetDevice symbol error on ROCm.

pytestmark = [pytest.mark.core_model, pytest.mark.diffusion, pytest.mark.gpu]


def patch_cumem_allocator(mocker: MockerFixture):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good: Helper function centralizes the mock patching pattern.

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

amd ci passed

@hsliuustc0106
hsliuustc0106 merged commit e70822e into vllm-project:main Jun 20, 2026
7 of 8 checks passed
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants