__init__.py 567 Bytes
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
from typing import TYPE_CHECKING
4

5
6
7
8
9
from vllm.triton_utils.importing import (
    HAS_TRITON,
    TritonLanguagePlaceholder,
    TritonPlaceholder,
)
10

11
if TYPE_CHECKING or HAS_TRITON:
12
13
    import triton
    import triton.language as tl
14
    import triton.language.extra.libdevice as tldevice
15
16
17
else:
    triton = TritonPlaceholder()
    tl = TritonLanguagePlaceholder()
18
    tldevice = TritonLanguagePlaceholder()
19

20
__all__ = ["HAS_TRITON", "triton", "tl", "tldevice"]