[Kernel] Add non-gated support for NVFP4 CUTLASS MoE (#37320)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
@@ -989,6 +989,7 @@ def get_cutlass_moe_mm_data(
|
||||
n: int,
|
||||
k: int,
|
||||
blockscale_offsets: torch.Tensor | None = None,
|
||||
is_gated: bool = True,
|
||||
):
|
||||
"""
|
||||
Prepare data necessary to perform CUTLASS grouped matrix multiplications
|
||||
@@ -1012,6 +1013,8 @@ def get_cutlass_moe_mm_data(
|
||||
its computation. The number of block scale rows
|
||||
computed with expert E is blockscale_offsets[E + 1] -
|
||||
blockscale_offsets[E]
|
||||
- is_gated: Whether the activation is gated (gate + up). When True, the
|
||||
first GEMM N dimension is 2*n; when False, it is n.
|
||||
"""
|
||||
return torch.ops._C.get_cutlass_moe_mm_data(
|
||||
topk_ids,
|
||||
@@ -1024,6 +1027,7 @@ def get_cutlass_moe_mm_data(
|
||||
n,
|
||||
k,
|
||||
blockscale_offsets,
|
||||
is_gated,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user