File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: Apache-2.0
22# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3+ # ruff: noqa: E402, I001
34"""Unit-level tests for the AITER ``BatchedExperts`` FP8 wrapper.
45
56These tests guard reshape and oracle-selection contracts without invoking
1819from types import SimpleNamespace
1920
2021import pytest
21- import torch
22+
23+ from vllm .platforms import current_platform
24+
25+ if not current_platform .is_rocm ():
26+ pytest .skip (
27+ "AITER BatchedExperts tests require ROCm." ,
28+ allow_module_level = True ,
29+ )
2230
2331from vllm ._aiter_ops import is_aiter_found_and_supported
32+
33+ if not is_aiter_found_and_supported ():
34+ pytest .skip (
35+ "AITER BatchedExperts tests require supported ROCm AITER." ,
36+ allow_module_level = True ,
37+ )
38+
39+ import torch # noqa: E402
2440from vllm .model_executor .layers .fused_moe import modular_kernel as mk
2541from vllm .model_executor .layers .fused_moe .activation import MoEActivation
2642from vllm .model_executor .layers .fused_moe .config import (
4258 select_fp8_moe_backend ,
4359)
4460
45- pytestmark = pytest .mark .skipif (
46- not is_aiter_found_and_supported (),
47- reason = "AITER BatchedExperts tests require supported ROCm AITER." ,
48- )
49-
5061
5162def _make_moe_config (
5263 * ,
You can’t perform that action at this time.
0 commit comments