diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index d5137fcfc6d4..a6de3b13019f 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -3,6 +3,7 @@ from typing import List, Optional, Tuple, Union import torch +import torch.library import vllm.envs as envs from vllm._core_ext import ScalarType @@ -25,12 +26,12 @@ import vllm._moe_C # noqa: F401 supports_moe_ops = True -import torch.library try: import torch.library.register_fake except ImportError: from torch.library import impl_abstract as register_fake + def hint_on_error(fn): @functools.wraps(fn)