已合并
将test_mish、test_silu等skip掉的用例重新补回来 #33558
xiaoqi-zhou创建于 4月13日
将test_mish、test_silu等skip掉的用例重新补回来 #33558
已合并
共 4 个文件变更+3-11
| @@ -30,8 +30,7 @@ class TestActivations(TestCase): | |||
| 30 | res = model(input1) | 30 | res = model(input1) |
| 31 | res.backward(torch.ones_like(res)) | 31 | res.backward(torch.ones_like(res)) |
| 32 | return res.detach().cpu(), input1.grad.cpu() | 32 | return res.detach().cpu(), input1.grad.cpu() |
| 33 | - | 33 | + |
| 34 | - | ||
| 35 | def test_mish(self): | 34 | def test_mish(self): |
| 36 | dtype_list = [np.float16, np.float32] | 35 | dtype_list = [np.float16, np.float32] |
| 37 | format_list = [-1, 0, 2] | 36 | format_list = [-1, 0, 2] |
| @@ -82,7 +81,6 @@ class TestActivations(TestCase): | |||
| 82 | output.backward() | 81 | output.backward() |
| 83 | return res.detach().cpu(), input1.grad.cpu() | 82 | return res.detach().cpu(), input1.grad.cpu() |
| 84 | 83 | ||
| 85 | - | ||
| 86 | def test_silu(self): | 84 | def test_silu(self): |
| 87 | dtype_list = [np.float32, np.float16] | 85 | dtype_list = [np.float32, np.float16] |
| 88 | format_list = [-1, 0, 2] | 86 | format_list = [-1, 0, 2] |
| @@ -32,7 +32,6 @@ class NpuMNIST(nn.Module): | |||
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | class TestEnsembleDropout(unittest.TestCase): | 34 | class TestEnsembleDropout(unittest.TestCase): |
| 35 | - | ||
| 36 | def test_EnsembleDropout(self): | 35 | def test_EnsembleDropout(self): |
| 37 | model = NpuMNIST().to("npu") | 36 | model = NpuMNIST().to("npu") |
| 38 | x = torch.randn(2, 1, 16, 16).to("npu") | 37 | x = torch.randn(2, 1, 16, 16).to("npu") |
| @@ -1,5 +1,3 @@ | |||
| 1 | -import unittest | ||
| 2 | - | ||
| 3 | import torch | 1 | import torch |
| 4 | import torch_npu | 2 | import torch_npu |
| 5 | 3 | ||
| @@ -29,7 +27,6 @@ class TestPsRoiPooling(TestCase): | |||
| 29 | output.sum().backward() | 27 | output.sum().backward() |
| 30 | return output.detach().cpu(), cls_feat.grad.cpu() | 28 | return output.detach().cpu(), cls_feat.grad.cpu() |
| 31 | 29 | ||
| 32 | - | ||
| 33 | def test_npu_roi_align_1(self): | 30 | def test_npu_roi_align_1(self): |
| 34 | cls_feat = torch.randn(4, 1078, 84, 84).float().npu() | 31 | cls_feat = torch.randn(4, 1078, 84, 84).float().npu() |
| 35 | rois_tensor = self.get_random_rois((4, 128, 5)).permute(0, 2, 1).float().npu() | 32 | rois_tensor = self.get_random_rois((4, 128, 5)).permute(0, 2, 1).float().npu() |
| @@ -32150,11 +32150,9 @@ | |||
| 32150 | "test_register_state_dict_pre_hook_backward_compat (__main__.TestNN)": ["", [""]], | 32150 | "test_register_state_dict_pre_hook_backward_compat (__main__.TestNN)": ["", [""]], |
| 32151 | "test_CTCLoss_empty_target_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], | 32151 | "test_CTCLoss_empty_target_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], |
| 32152 | "test_to_complex_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], | 32152 | "test_to_complex_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], |
| 32153 | - "test_npu_roi_align_1 (__main__.TestPsRoiPooling)": ["", [""]], | 32153 | + "test_codegen_upcast_to_fp32_emits_cast_bfloat16_upcast_flag_True (__main__.TestCodegenUpcastToFP32)": ["", [""]], |
| 32154 | - "test_silu (__main__.TestActivations)": ["", [""]], | ||
| 32155 | - "test_codegen_upcast_to_fp32_emits_cast_bfloat16_upcast_flag_True (__main__.TestCodegenUpcastToFP32)": ["", [""]], | ||
| 32156 | "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]], | 32154 | "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]], |
| 32157 | - "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]], | 32155 | + "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]], |
| 32158 | "test_grad_with_split_b_w (__main__.TestScheduleLowering)": ["", [""]], | 32156 | "test_grad_with_split_b_w (__main__.TestScheduleLowering)": ["", [""]], |
| 32159 | "test_grad_with_v_schedule (__main__.TestScheduleLowering)": ["", [""]] | 32157 | "test_grad_with_v_schedule (__main__.TestScheduleLowering)": ["", [""]] |
| 32160 | } | 32158 | } |