@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / c9a9db0e02
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 5, 16:00 UTC

[Compile] Fix nvfp4 compile warning (#38573)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Apr 1, 2026 at 14:28 UTC c9a9db0e023a03f7e2c40e43be302fb07512946a
1 file changed +7 -4
csrc/libtorch_stable/quantization/fp4/nvfp4_quant_entry.cu
+7 -4
@@ -58,16 +58,19 @@ void silu_and_mul_scaled_fp4_experts_quant_sm1xxa(
58 torch::stable::Tensor const& output_scale_offset_by_experts);
59 #endif
60
61 +#if (defined(ENABLE_NVFP4_SM100) && ENABLE_NVFP4_SM100) || \
62 + (defined(ENABLE_NVFP4_SM120) && ENABLE_NVFP4_SM120)
63 static bool nvfp4_quant_sm_supported() {
64 const int32_t sm = get_sm_version_num();
63 -#if defined(ENABLE_NVFP4_SM100) && ENABLE_NVFP4_SM100
65 + #if defined(ENABLE_NVFP4_SM100) && ENABLE_NVFP4_SM100
66 if (sm >= 100 && sm < 120) return true;
65 -#endif
66 -#if defined(ENABLE_NVFP4_SM120) && ENABLE_NVFP4_SM120
67 + #endif
68 + #if defined(ENABLE_NVFP4_SM120) && ENABLE_NVFP4_SM120
69 if (sm >= 120 && sm < 130) return true;
68 -#endif
70 + #endif
71 return false;
72 }
73 +#endif
74
75 void scaled_fp4_quant_out(torch::stable::Tensor const& input,
76 torch::stable::Tensor const& input_sf,