[MoE Refactor] Oracle Select FP8+NVFP4 Kernels In Priority (#32414)
This commit is contained in:
@@ -128,11 +128,15 @@ def _fp8_linear_may_use_deep_gemm(module: torch.nn.Module) -> bool:
|
||||
"""
|
||||
Return True if the input module/layer could be processed with DeepGEMM.
|
||||
"""
|
||||
|
||||
# FIXME: this logic is brittle and incorrect - since we
|
||||
# could use DeepGEMM with for than just Fp8LinearMethod
|
||||
block_size = get_mk_alignment_for_contiguous_layout()[0]
|
||||
if not (
|
||||
isinstance(module, LinearBase)
|
||||
and isinstance(module.quant_method, Fp8LinearMethod)
|
||||
and module.quant_method.block_quant
|
||||
and not module.quant_method.use_marlin
|
||||
):
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user