Skip to content

Commit 7a82134

Browse files
committed
add rose tests
Signed-off-by: Bill Nell <bnell@redhat.com>
1 parent acb784e commit 7a82134

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

tests/kernels/moe/modular_kernel_tools/common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
FusedMoEQuantConfig,
2424
)
2525
from vllm.model_executor.layers.fused_moe.fused_moe import fused_topk
26-
from vllm.utils.import_utils import has_deep_ep, has_deep_gemm, has_pplx
26+
from vllm.utils.import_utils import has_deep_ep, has_deep_gemm, has_pplx, has_rose
2727

2828
from .mk_objects import (
2929
TestMoEQuantConfig,
@@ -199,6 +199,10 @@ def needs_pplx(self):
199199
info = prepare_finalize_info(self.prepare_finalize_type)
200200
return info.backend == "pplx"
201201

202+
def needs_rose(self):
203+
info = prepare_finalize_info(self.prepare_finalize_type)
204+
return info.backend == "rose"
205+
202206
def needs_deep_ep(self):
203207
info = prepare_finalize_info(self.prepare_finalize_type)
204208
return (
@@ -273,6 +277,8 @@ def is_valid(self) -> tuple[bool, str | None]:
273277
return False, "Needs DeepGEMM, but DeepGEMM not available."
274278
if self.needs_pplx() and not has_pplx(): # noqa: SIM103
275279
return False, "Needs PPLX, but PPLX not available."
280+
if self.needs_rose() and not has_rose(): # noqa: SIM103
281+
return False, "Needs Rose, but Rose not available."
276282

277283
return True, None
278284

tests/kernels/moe/modular_kernel_tools/mk_objects.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from vllm.platforms import current_platform
4141
from vllm.utils.deep_gemm import is_deep_gemm_supported
4242
from vllm.utils.flashinfer import has_flashinfer_cutlass_fused_moe
43-
from vllm.utils.import_utils import has_deep_ep, has_deep_gemm, has_pplx
43+
from vllm.utils.import_utils import has_deep_ep, has_deep_gemm, has_pplx, has_rose
4444

4545

4646
@dataclass
@@ -234,6 +234,19 @@ def expert_info(kind) -> ExpertInfo:
234234
backend="pplx",
235235
)
236236

237+
if has_rose():
238+
from vllm.model_executor.layers.fused_moe.rose_prepare_finalize import (
239+
RosePrepareAndFinalize,
240+
)
241+
242+
register_prepare_and_finalize(
243+
RosePrepareAndFinalize,
244+
batched_format,
245+
common_float_and_int_types,
246+
blocked_quantization_support=True,
247+
backend="rose",
248+
)
249+
237250
if has_flashinfer_cutlass_fused_moe() and current_platform.has_device_capability(100):
238251
from vllm.model_executor.layers.fused_moe.flashinfer_cutlass_moe import (
239252
FlashInferExperts,

0 commit comments

Comments
 (0)