已合并
【inductor】fix inductor ci bug #30190
kkjocker创建于 1月29日
【inductor】fix inductor ci bug #30190
已合并
kkjocker创建于 1月29日
3 个文件变更+4-5
@@ -1,4 +1,3 @@
1-from unittest import skip
2import torch1import torch
3from torch.testing._internal.common_utils import run_tests2from torch.testing._internal.common_utils import run_tests
4from testutils import TestUtils3from testutils import TestUtils
@@ -20,7 +19,6 @@ class Test_issue59(TestUtils):
20 mean_2 = rsqrt / torch.numel(rsqrt)19 mean_2 = rsqrt / torch.numel(rsqrt)
21 return mul, add, mean_220 return mul, add, mean_2
22 21 
23- @skip("skip ci error")
24 def test_issue59(self):22 def test_issue59(self):
25 device = 'npu'23 device = 'npu'
26 x = torch.randn((1, 1024), device=device, dtype=torch.float32)24 x = torch.randn((1, 1024), device=device, dtype=torch.float32)
@@ -1,4 +1,3 @@
1-from unittest import skip
2import torch1import torch
3from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests2from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests
4from testutils import TestUtils3from testutils import TestUtils
@@ -10,7 +9,6 @@ class TestVarMean(TestUtils):
10 return torch.var_mean(input_element, dim)9 return torch.var_mean(input_element, dim)
11 10 
12 # case:The shape must not be too large11 # case:The shape must not be too large
13- @skip("skip ci codegen error")
14 @parametrize('shape', [(8, 64, 128)])12 @parametrize('shape', [(8, 64, 128)])
15 @parametrize('dim', [0, 1, 2, (0, 2), (0, 1)])13 @parametrize('dim', [0, 1, 2, (0, 2), (0, 1)])
16 @parametrize('dtype', ['float32'])14 @parametrize('dtype', ['float32'])
@@ -1171,7 +1171,10 @@ class NPUIndexTritonKernel(TritonKernel):
1171 ) -> Union[CSEVariable, Tuple[CSEVariable, ...]]:1171 ) -> Union[CSEVariable, Tuple[CSEVariable, ...]]:
1172 if not self.inside_reduction:1172 if not self.inside_reduction:
1173 raise RuntimeError("assert self.inside_reduction")1173 raise RuntimeError("assert self.inside_reduction")
1174- masks = {f"{node.symbol()}_mask" for node in self.sorted_axis}1174+ if self.persistent_reduction and self.numof_reduction_axis() == 1:
1175+ masks = {f"{node.symbol()}_mask" for node in self.sorted_axis if node.name[0] != "r"}
1176+ else:
1177+ masks = {f"{node.symbol()}_mask" for node in self.sorted_axis}
1175 self.filter_masks(masks)1178 self.filter_masks(masks)
1176 masks = sorted(masks)1179 masks = sorted(masks)
1177 if self._load_mask:1180 if self._load_mask: