forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run test_torchinductor_opinfo CPU tests if triton not installed (pyto…
…rch#88934) These test are not run currently because normal CI workers don't have triton installed. Pull Request resolved: pytorch#88934 Approved by: https://github.com/ngimel
- Loading branch information
1 parent
072920c
commit 8371bb8
Showing
3 changed files
with
43 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from subprocess import CalledProcessError | ||
|
||
from torch._inductor.codecache import CppCodeCache | ||
from torch._inductor.utils import has_triton | ||
from torch.testing._internal.common_utils import ( | ||
IS_FBCODE, | ||
TEST_WITH_ROCM, | ||
) | ||
import torch | ||
|
||
HAS_CPU = False | ||
try: | ||
CppCodeCache.load("") | ||
HAS_CPU = not IS_FBCODE | ||
except ( | ||
CalledProcessError, | ||
OSError, | ||
torch._inductor.exc.InvalidCxxCompiler, | ||
torch._inductor.exc.CppCompileError, | ||
): | ||
pass | ||
|
||
HAS_CUDA = has_triton() and not TEST_WITH_ROCM |