Skip to content

Commit c5b373f

Browse files
committed
Reply to delete code
1 parent f8952b4 commit c5b373f

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

vllm_fl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def register_router():
150150

151151
def register_model():
152152
"""Register FL-specific models not yet upstream."""
153+
from vllm import ModelRegistry
153154
_register_flagcx_connector()
154155

155156
# Register OOT quant kernels so kernel selection can find them
@@ -176,7 +177,6 @@ def register_model():
176177
except Exception as e:
177178
logger.error(f"Register DeepseekV4 model error: {str(e)}")
178179

179-
180180
# Register DeepseekV4 model
181181
try:
182182
ModelRegistry.register_model(

vllm_fl/ops/custom_ops.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
OOT_OPS = {
2424
"silu_and_mul": (SiluAndMulFL, "SiluAndMul"), # noqa F405
2525
"gelu_and_mul": (GeluAndMulFL, "GeluAndMul"), # noqa F405
26+
"silu_and_mul_with_clamp": (SiluAndMulWithClampFL, "SiluAndMulWithClamp"), # noqa F405
2627
"rms_norm": (RMSNormFL, "RMSNorm"), # noqa F405
2728
"rotary_embedding": (RotaryEmbeddingFL, "RotaryEmbedding"), # noqa F405
2829
"fused_moe": (FusedMoEFL, "FusedMoE"), # noqa F405

vllm_fl/ops/fused_moe/fused_moe_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,11 @@ def apply(
368368
# Fast path (no LoRA): single fused call via patched fused_experts_impl.
369369
if self._lora_context is None:
370370
from vllm_fl.ops.fused_moe.fused_moe import fused_experts_impl as _fused_experts_impl
371+
# Fast path (no LoRA, NVIDIA only): single fused FlagGems call.
372+
if self._lora_context is None and current_platform.is_cuda():
373+
import flag_gems
371374

372-
output.copy_(_fused_experts_impl(
375+
output.copy_(flag_gems.fused_experts_impl(
373376
hidden_states,
374377
w1,
375378
w2,

0 commit comments

Comments
 (0)