File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
tests/kernels/moe/modular_kernel_tools Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 2323 FusedMoEQuantConfig ,
2424)
2525from 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
2828from .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
Original file line number Diff line number Diff line change 4040from vllm .platforms import current_platform
4141from vllm .utils .deep_gemm import is_deep_gemm_supported
4242from 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+
237250if 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 ,
You can’t perform that action at this time.
0 commit comments