[Bugfix] Fix triton import with local TritonPlaceholder (#17446)
Signed-off-by: Mengqing Cao <cmq0113@163.com>
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from vllm.triton_utils.importing import HAS_TRITON
|
||||
from vllm.triton_utils.importing import (HAS_TRITON, TritonLanguagePlaceholder,
|
||||
TritonPlaceholder)
|
||||
|
||||
__all__ = ["HAS_TRITON"]
|
||||
if HAS_TRITON:
|
||||
import triton
|
||||
import triton.language as tl
|
||||
else:
|
||||
triton = TritonPlaceholder()
|
||||
tl = TritonLanguagePlaceholder()
|
||||
|
||||
__all__ = ["HAS_TRITON", "triton", "tl"]
|
||||
|
||||
Reference in New Issue
Block a user