__init__.py 517 Bytes
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3

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

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

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