hxrron's picture
Add files using upload-large-folder tool
037353a verified
Raw History Blame Contribute Delete
350 Bytes
import functools
@functools.lru_cache(None)
def is_triton_available():
try:
# torch>=2.2.0
from torch.utils._triton import has_triton, has_triton_package
return has_triton_package() and has_triton()
except ImportError:
from torch._inductor.utils import has_triton
return has_triton()