已合并
将test_mish、test_silu等skip掉的用例重新补回来 #36591
xiaoqi-zhou创建于 5月25日
将test_mish、test_silu等skip掉的用例重新补回来 #36591
已合并
共 3 个文件变更+1-7
| @@ -32,10 +32,9 @@ 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, 10, 16, 16).to("npu") | 37 | + x = torch.randn(2, 1, 16, 16).to("npu") |
| 39 | NpuFairseqDropout.enable_dropout_ensemble(model) | 38 | NpuFairseqDropout.enable_dropout_ensemble(model) |
| 40 | dropout = NpuFairseqDropout(p=0.5) | 39 | dropout = NpuFairseqDropout(p=0.5) |
| 41 | output = model(x, dropout) | 40 | output = model(x, dropout) |
| @@ -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() |
| @@ -32085,8 +32085,6 @@ | |||
| 32085 | "test_register_state_dict_pre_hook_backward_compat (__main__.TestNN)": ["", [""]], | 32085 | "test_register_state_dict_pre_hook_backward_compat (__main__.TestNN)": ["", [""]], |
| 32086 | "test_softmax_forward_64bit_indexing_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], | 32086 | "test_softmax_forward_64bit_indexing_npu (__main__.TestNNDeviceTypePRIVATEUSE1)": ["", [""]], |
| 32087 | "test_upsampling_bfloat16 (__main__.TestNN)": ["", [""]], | 32087 | "test_upsampling_bfloat16 (__main__.TestNN)": ["", [""]], |
| 32088 | - "test_npu_roi_align_1 (__main__.TestPsRoiPooling)": ["", [""]], | ||
| 32089 | - "test_silu (__main__.TestActivations)": ["", [""]], | ||
| 32090 | "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]], | 32088 | "test_data_parallel_rnn (__main__.TestDataParallel)": ["", ["Disabled during A1 to A2 chip transition"]], |
| 32091 | "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]], | 32089 | "test_alltoall_single_2p_size_dist (__main__.HcclAlltoAllSingleTest)": ["", ["Disabled during A1 to A2 chip transition"]], |
| 32092 | "test_stream (__main__.StreamintoDynamoTests)": ["", ["Dynamo Stream support incomplete: wait_stream() not properly handled. Introduced by commit d3be6fdfa"]], | 32090 | "test_stream (__main__.StreamintoDynamoTests)": ["", ["Dynamo Stream support incomplete: wait_stream() not properly handled. Introduced by commit d3be6fdfa"]], |