[Metax] support cutlass moe & optimize flash attention (#4208)
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Deploy GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
xiaozude
2025-09-29 11:22:43 +08:00
committed by GitHub
parent 2b2b645296
commit 7c919070f7
20 changed files with 2786 additions and 103 deletions
@@ -123,10 +123,18 @@ class WeightOnlyConfig(QuantConfigBase):
elif current_platform.is_maca():
if isinstance(layer, FusedMoE):
from fastdeploy.model_executor.layers.backends import (
MetaxCutlassWeightOnlyMoEMethod,
MetaxTritonWeightOnlyMoEMethod,
)
return MetaxTritonWeightOnlyMoEMethod(self)
if layer.use_method == "cutlass":
return MetaxCutlassWeightOnlyMoEMethod(self)
elif layer.use_method == "triton":
return MetaxTritonWeightOnlyMoEMethod(self)
else:
raise ValueError(f"Unsupported MOE backend {layer.use_method}")
else:
return GPUWeightOnlyLinearMethod(self)