已合并
add_triton_warning #39028
cuiduo创建于 6月23日
add_triton_warning #39028
已合并
cuiduo创建于 6月23日
2 个文件变更+3-0
@@ -9,6 +9,7 @@ from torch.testing._internal.common_utils import (
9)9)
10from testutils import TestUtils10from testutils import TestUtils
11import torch_npu11import torch_npu
12+import torch_npu._inductor
12 13 
13 14 
14class TestWrapTriton(TestUtils):15class TestWrapTriton(TestUtils):
@@ -74,6 +74,8 @@ def _load_triton_backend():
74 import torch74 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 return79 return
78 import logging80 import logging
79 log = logging.getLogger(__name__)81 log = logging.getLogger(__name__)