Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/sglang/srt/layers/quantization/modelopt_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1654,11 +1654,15 @@ def apply(

output_dtype = torch.bfloat16

# If x_sf is not None, x is FP4 packed (half size), so we need * 2
# If x_sf is None, x is not packed, so output_col = x.shape[1]
output_col = x.shape[1] * 2 if x_sf is not None else x.shape[1]

with use_symmetric_memory(
get_tp_group(), disabled=not is_allocation_symmetric()
):
symm_output = torch.empty(
x.shape[0], x.shape[1] * 2, dtype=output_dtype, device=x.device
x.shape[0], output_col, dtype=output_dtype, device=x.device
)

output = flashinfer_cutlass_fused_moe(
Expand Down
Loading