已合并
add white list for 2.13 #45391
pangjiayi创建于 13 天前
add white list for 2.13 #45391
已合并
共 4 个文件变更+10-4
| @@ -71,7 +71,10 @@ class TestMgr: | |||
| 71 | self.test_files['ut_files'] += [str(i) for i in (BASE_DIR / 'test/distributed').rglob('test_*.py')] | 71 | self.test_files['ut_files'] += [str(i) for i in (BASE_DIR / 'test/distributed').rglob('test_*.py')] |
| 72 | 72 | ||
| 73 | def load_inductor_ut(self): | 73 | def load_inductor_ut(self): |
| 74 | - self.test_files['ut_files'] += [str(i) for i in (BASE_DIR / 'test/_inductor').rglob('test_*.py')] | 74 | + self.test_files['ut_files'] = [ |
| 75 | + str(BASE_DIR / 'test/_inductor/test_add.py'), | ||
| 76 | + str(BASE_DIR / 'test/_inductor/test_abs.py'), | ||
| 77 | + ] | ||
| 75 | 78 | ||
| 76 | def load_op_plugin_ut(self): | 79 | def load_op_plugin_ut(self): |
| 77 | if not os.path.exists(BASE_DIR / 'third_party/op-plugin/test'): | 80 | if not os.path.exists(BASE_DIR / 'third_party/op-plugin/test'): |
| @@ -1,14 +1,15 @@ | |||
| 1 | import torch | 1 | import torch |
| 2 | from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests | 2 | from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests |
| 3 | from testutils import TestUtils | 3 | from testutils import TestUtils |
| 4 | -import torch_npu | 4 | +import torch_npu # noqa: F401 |
| 5 | - | 5 | +from version_mark import runIfVersion |
| 6 | 6 | ||
| 7 | class TestAbs(TestUtils): | 7 | class TestAbs(TestUtils): |
| 8 | def op_calc(self, first_element): | 8 | def op_calc(self, first_element): |
| 9 | result = torch.abs(first_element) | 9 | result = torch.abs(first_element) |
| 10 | return result | 10 | return result |
| 11 | 11 | ||
| 12 | + | ||
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | def test_pointwise_cases(self, shape, dtype): | 15 | def test_pointwise_cases(self, shape, dtype): |
| @@ -1,13 +1,14 @@ | |||
| 1 | import torch | 1 | import torch |
| 2 | from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests | 2 | from torch.testing._internal.common_utils import run_tests, parametrize, instantiate_parametrized_tests |
| 3 | from testutils import TestUtils | 3 | from testutils import TestUtils |
| 4 | - | 4 | +from version_mark import runIfVersion |
| 5 | 5 | ||
| 6 | class TestAdd(TestUtils): | 6 | class TestAdd(TestUtils): |
| 7 | def op_calc(self, first_element, second_element): | 7 | def op_calc(self, first_element, second_element): |
| 8 | result = first_element + second_element | 8 | result = first_element + second_element |
| 9 | return result | 9 | return result |
| 10 | 10 | ||
| 11 | + | ||
| 11 | 12 | ||
| 12 | 13 | ||
| 13 | def test_pointwise_cases(self, shape, dtype): | 14 | def test_pointwise_cases(self, shape, dtype): |
| @@ -435,6 +435,7 @@ class flex_attention: | |||
| 435 | # been reviewed. Unsupported graphs always retain the legacy dK/dV path. | 435 | # been reviewed. Unsupported graphs always retain the legacy dK/dV path. |
| 436 | bwd_dkdv_tasklist = True | 436 | bwd_dkdv_tasklist = True |
| 437 | 437 | ||
| 438 | + | ||
| 438 | flex_attention.bwd_dkdv_tasklist = _read_env_bool( | 439 | flex_attention.bwd_dkdv_tasklist = _read_env_bool( |
| 439 | "TORCHINDUCTOR_ASCEND_FLEX_ATTENTION_BWD_DKDV_TASKLIST", | 440 | "TORCHINDUCTOR_ASCEND_FLEX_ATTENTION_BWD_DKDV_TASKLIST", |
| 440 | "1" if flex_attention.bwd_dkdv_tasklist else "0", | 441 | "1" if flex_attention.bwd_dkdv_tasklist else "0", |