Unverified Commit 71d41212 authored by Qiaolin Yu's avatar Qiaolin Yu Committed by GitHub
Browse files

Fix dpsk-r1-fp4 launching crash (#12063)

parent b9fb74f3
...@@ -587,13 +587,11 @@ class Mxfp4MoEMethod(FusedMoEMethodBase): ...@@ -587,13 +587,11 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
self, layer: torch.nn.Module, moe_runner_config: MoeRunnerConfig self, layer: torch.nn.Module, moe_runner_config: MoeRunnerConfig
): ):
self.moe_runner_config = moe_runner_config self.moe_runner_config = moe_runner_config
backend = get_moe_runner_backend() backend = (
if backend.is_auto(): MoeRunnerBackend.TRITON_KERNELS
backend = ( if self.use_triton_kernels
MoeRunnerBackend.TRITON_KERNELS else MoeRunnerBackend.TRITON
if self.use_triton_kernels )
else MoeRunnerBackend.TRITON
)
self.runner = MoeRunner(backend, moe_runner_config) self.runner = MoeRunner(backend, moe_runner_config)
def apply( def apply(
......
...@@ -8,12 +8,7 @@ from torch.nn.parameter import Parameter ...@@ -8,12 +8,7 @@ from torch.nn.parameter import Parameter
from sglang.srt.custom_op import CustomOp from sglang.srt.custom_op import CustomOp
from sglang.srt.layers.amx_utils import _amx_process_weight_after_loading from sglang.srt.layers.amx_utils import _amx_process_weight_after_loading
from sglang.srt.layers.moe import ( from sglang.srt.layers.moe import MoeRunner, MoeRunnerBackend, MoeRunnerConfig
MoeRunner,
MoeRunnerBackend,
MoeRunnerConfig,
get_moe_runner_backend,
)
from sglang.srt.layers.moe.moe_runner.triton import TritonMoeQuantInfo from sglang.srt.layers.moe.moe_runner.triton import TritonMoeQuantInfo
from sglang.srt.layers.quantization.base_config import ( from sglang.srt.layers.quantization.base_config import (
FusedMoEMethodBase, FusedMoEMethodBase,
...@@ -225,13 +220,11 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp): ...@@ -225,13 +220,11 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
self, layer: torch.nn.Module, moe_runner_config: MoeRunnerConfig self, layer: torch.nn.Module, moe_runner_config: MoeRunnerConfig
): ):
self.moe_runner_config = moe_runner_config self.moe_runner_config = moe_runner_config
backend = get_moe_runner_backend() backend = (
if backend.is_auto(): MoeRunnerBackend.TRITON_KERNELS
backend = ( if self.use_triton_kernels
MoeRunnerBackend.TRITON_KERNELS else MoeRunnerBackend.TRITON
if self.use_triton_kernels )
else MoeRunnerBackend.TRITON
)
self.runner = MoeRunner(backend, moe_runner_config) self.runner = MoeRunner(backend, moe_runner_config)
def apply( def apply(
......
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