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

This reverts commit 940b60db974f08a31c746eec2f9c399fc8a861ee.

Reverted https://github.com/pytorch/pytorch/pull/139171 on behalf of https://github.com/ZainRizvi due to Sorry but this is breaking internally. @jansel can you please help get these changes working? See D70946254 for more details. To validate the fixes internally, you can follow the instructions here: https://fburl.com/fixing-ghfirst-reverts ([comment](https://github.com/pytorch/pytorch/pull/139171#issuecomment-2715392451))
This commit is contained in:
PyTorch MergeBot
2025-03-11 18:49:21 +00:00
parent 57ee821a41
commit c916a8efc5
18 changed files with 128 additions and 243 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