Simplify two ipex conditions (#2755)
This commit is contained in:
parent
38cff84a3e
commit
b4ec427ad0
|
@ -8,10 +8,10 @@ from text_generation_server.utils.weights import UnquantizedWeight, Weights
|
||||||
|
|
||||||
if SYSTEM == "rocm":
|
if SYSTEM == "rocm":
|
||||||
from vllm.model_executor.layers.fused_moe import fused_moe
|
from vllm.model_executor.layers.fused_moe import fused_moe
|
||||||
elif SYSTEM != "ipex":
|
elif SYSTEM == "ipex":
|
||||||
from moe_kernels.fused_moe import fused_moe
|
|
||||||
else:
|
|
||||||
from intel_extension_for_pytorch.llm.modules import GatedMLPMOE
|
from intel_extension_for_pytorch.llm.modules import GatedMLPMOE
|
||||||
|
else:
|
||||||
|
from moe_kernels.fused_moe import fused_moe
|
||||||
|
|
||||||
|
|
||||||
class UnquantizedSparseMoELayer(nn.Module):
|
class UnquantizedSparseMoELayer(nn.Module):
|
||||||
|
|
|
@ -25,10 +25,10 @@ from text_generation_server.utils.import_utils import SYSTEM
|
||||||
|
|
||||||
if SYSTEM == "rocm":
|
if SYSTEM == "rocm":
|
||||||
from vllm.model_executor.layers.fused_moe import fused_moe
|
from vllm.model_executor.layers.fused_moe import fused_moe
|
||||||
elif SYSTEM != "ipex":
|
elif SYSTEM == "ipex":
|
||||||
from moe_kernels.fused_moe import fused_moe
|
|
||||||
else:
|
|
||||||
from intel_extension_for_pytorch.llm.modules import GatedMLPMOE
|
from intel_extension_for_pytorch.llm.modules import GatedMLPMOE
|
||||||
|
else:
|
||||||
|
from moe_kernels.fused_moe import fused_moe
|
||||||
|
|
||||||
from text_generation_server.layers.attention import (
|
from text_generation_server.layers.attention import (
|
||||||
paged_attention,
|
paged_attention,
|
||||||
|
|
Loading…
Reference in New Issue