We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ef6052 commit 60e419cCopy full SHA for 60e419c
vllm/model_executor/layers/fused_moe/utils.py
@@ -1,5 +1,6 @@
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
+import functools
4
from math import prod
5
6
import torch
@@ -325,5 +326,6 @@ def activation_without_mul(activation: str) -> str:
325
326
# Torch custom ops can't deal with outputs aliasing inputs so we need to
327
# disable inplace for torch >= 2.9.
328
# See https://github.com/vllm-project/vllm/issues/26378
329
+@functools.cache
330
def disable_inplace() -> bool:
331
return is_torch_equal_or_newer("2.9")
0 commit comments