"...git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "e6c6f2c79d2c1e0765d17b4dec83a4a8283342e4"
Unverified Commit c1395f72 authored by rasmith's avatar rasmith Committed by GitHub
Browse files

[CI][AMD][BugFix] Ensure VLLM_ROCM_USE_AITER is set so test_rocm_aiter_topk.py...


[CI][AMD][BugFix] Ensure VLLM_ROCM_USE_AITER is set so test_rocm_aiter_topk.py can run correctly (#33840)
Signed-off-by: default avatarRandall Smith <Randall.Smith@amd.com>
parent 007b183d
...@@ -10,22 +10,28 @@ ...@@ -10,22 +10,28 @@
# and the platform is not ROCm. # and the platform is not ROCm.
import importlib.util import importlib.util
import os
import pytest import pytest
import torch import torch
from vllm.platforms import current_platform
if not current_platform.is_rocm():
pytest.skip("This test can only run on ROCm.", allow_module_level=True)
# This environment variable must be set so ops will be registered.
os.environ["VLLM_ROCM_USE_AITER"] = "1"
# this import statement is needed to ensure the ops are registered # this import statement is needed to ensure the ops are registered
import vllm.model_executor.layers.fused_moe.rocm_aiter_fused_moe # noqa: F401 import vllm.model_executor.layers.fused_moe.rocm_aiter_fused_moe # noqa: F401
from vllm.platforms import current_platform
# need to import once to ensure the ops are registered # need to import once to ensure the ops are registered
# Check if aiter package is installed # Check if aiter package is installed
aiter_available = importlib.util.find_spec("aiter") is not None aiter_available = importlib.util.find_spec("aiter") is not None
pytestmark = pytest.mark.skipif( if not aiter_available:
not (current_platform.is_rocm() and aiter_available), pytest.skip("These tests require AITER to run.", allow_module_level=True)
reason="AITER ops are only available on ROCm with aiter package installed",
)
def test_rocm_aiter_biased_grouped_topk_custom_op_registration(): def test_rocm_aiter_biased_grouped_topk_custom_op_registration():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment