[Bugfix] Disable moe inplace for torch >= 2.9 (#26497)

Signed-off-by: Bill Nell <bnell@redhat.com>
This commit is contained in:
bnellnm
2025-10-09 18:07:38 +00:00
committed by GitHub
parent 4069db3f2e
commit a462331e36
4 changed files with 22 additions and 6 deletions
@@ -23,7 +23,7 @@ from vllm.model_executor.layers.quantization.utils.mxfp8_utils import (
mxfp8_e4m3_quantize,
)
from vllm.triton_utils import tl, triton
from vllm.utils import cdiv
from vllm.utils import cdiv, is_torch_equal_or_newer
from vllm.utils.flashinfer import flashinfer_fp4_quantize
@@ -321,3 +321,10 @@ def _validate_scale_shape(
def activation_without_mul(activation: str) -> str:
return activation + "_no_mul"
# Torch custom ops can't deal with outputs aliasing inputs so we need to
# disable inplace for torch >= 2.9.
# See https://github.com/vllm-project/vllm/issues/26378
def disable_inplace() -> bool:
return is_torch_equal_or_newer("2.9")