已合并
add_triton_warning #39028
cuiduo创建于 6月23日
add_triton_warning #39028
已合并
共 2 个文件变更+3-0
| @@ -9,6 +9,7 @@ from torch.testing._internal.common_utils import ( | |||
| 9 | ) | 9 | ) |
| 10 | from testutils import TestUtils | 10 | from testutils import TestUtils |
| 11 | import torch_npu | 11 | import torch_npu |
| 12 | +import torch_npu._inductor | ||
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | class TestWrapTriton(TestUtils): | 15 | class TestWrapTriton(TestUtils): |
| @@ -74,6 +74,8 @@ def _load_triton_backend(): | |||
| 74 | import torch | 74 | import torch |
| 75 | has_triton = torch.utils._triton.has_triton() | 75 | has_triton = torch.utils._triton.has_triton() |
| 76 | if not has_triton: | 76 | if not has_triton: |
| 77 | + import warnings | ||
| 78 | + warnings.warn("triton-ascend is not installed, install it first.") | ||
| 77 | return | 79 | return |
| 78 | import logging | 80 | import logging |
| 79 | log = logging.getLogger(__name__) | 81 | log = logging.getLogger(__name__) |