Revert "has_triton: Use the device interface for detecting Triton availability (#139171)"

This reverts commit 48bfe9afc70a98addd5aa738bf501c029e4a9285.

Reverted https://github.com/pytorch/pytorch/pull/139171 on behalf of https://github.com/masnesral due to Performance regression for huggingface ([comment](https://github.com/pytorch/pytorch/pull/139171#issuecomment-2868939790))
This commit is contained in:
PyTorch MergeBot
2025-05-10 14:46:23 +00:00
parent 70c8047c2d
commit 01bb249978
9 changed files with 56 additions and 68 deletions

View File

@ -8,7 +8,7 @@ from typing import Optional
import torch
from torch._dynamo.utils import warn_once
from torch.utils._triton import has_triton_package
from torch.utils._triton import has_triton
from ._triton_ops_meta import get_meta
@ -1323,7 +1323,7 @@ def bsr_dense_addmm(
return out_backup
if has_triton_package():
if has_triton():
import triton
import triton.language as tl