[Bug] Fix batch invariance nvfp4 support (#39820)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -601,7 +601,13 @@ def init_nvfp4_linear_kernel() -> NvFp4LinearKernel:
|
||||
|
||||
# Env-var overrides.
|
||||
force_kernel: type[NvFp4LinearKernel] | None = None
|
||||
if envs.VLLM_USE_FBGEMM:
|
||||
if envs.VLLM_BATCH_INVARIANT:
|
||||
logger.info_once(
|
||||
"VLLM_BATCH_INVARIANT forces NVFP4 linear to use the "
|
||||
"emulation backend for deterministic execution."
|
||||
)
|
||||
force_kernel = EmulationNvFp4LinearKernel
|
||||
elif envs.VLLM_USE_FBGEMM:
|
||||
force_kernel = FbgemmNvFp4LinearKernel
|
||||
elif envs.VLLM_USE_NVFP4_CT_EMULATIONS:
|
||||
force_kernel = EmulationNvFp4LinearKernel
|
||||
|
||||
Reference in New Issue
Block a user