Skip to content
Closed
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
15 changes: 15 additions & 0 deletions python/sglang/srt/layers/quantization/fp4_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ def initialize_fp4_gemm_config() -> None:
else:
backend = "flashinfer_cutlass"

# FP4 Marlin is weight-only (W4A16) and does not support W4A4 GEMM.
# FlashInfer's mm_fp4 rejects backend='marlin' on SM100+, so force a
# fallback whenever the user (or auto-selection) picks marlin on
# Blackwell GPUs. See issue #43988.
if backend == "marlin" and get_platform().is_blackwell:
fallback = (
"flashinfer_cutedsl" if get_platform().is_sm100 else "flashinfer_cutlass"
)
logger.warning(
"FP4 Marlin does not support SM100+ (Blackwell); falling back to %s. "
"FlashInfer's mm_fp4 has no 'marlin' backend for capability 100.",
fallback,
)
backend = fallback

FP4_GEMM_RUNNER_BACKEND = Fp4GemmRunnerBackend(backend)


Expand Down
Loading