Skip to content

Commit 5f3c8c2

Browse files
authored
remove useless block format cases (#4989) (#4995)
1 parent e98372d commit 5f3c8c2

File tree

3 files changed

+0
-709
lines changed

3 files changed

+0
-709
lines changed

tests/gpu/examples/test_batch_norm.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,6 @@
1212

1313

1414
class TestNNMethod(TestCase):
15-
def test_batch_norm_format(self, dtype=torch.float16):
16-
conv = nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1, bias=False)
17-
bn = nn.BatchNorm2d(32)
18-
19-
x_cpu = torch.randn([4, 32, 32, 32], device=cpu_device)
20-
21-
y_cpu1 = conv(x_cpu)
22-
y_cpu = bn(y_cpu1)
23-
24-
with torch.xpu.onednn_layout():
25-
x_dpcpp = x_cpu.to(dpcpp_device)
26-
27-
conv.to(dpcpp_device)
28-
bn.to(dpcpp_device)
29-
y_dpcpp1 = conv(x_dpcpp)
30-
y_dpcpp = bn(y_dpcpp1)
31-
32-
if not torch.xpu.utils.has_2d_block_array():
33-
self.assertTrue(torch.xpu.is_onednn_layout(y_dpcpp1))
34-
self.assertTrue(torch.xpu.is_onednn_layout(y_dpcpp))
35-
self.assertEqual(y_cpu, y_dpcpp.to(cpu_device))
36-
3715
def test_batch_norm_half(self, dtype=torch.half):
3816
x_i = torch.randn([2, 2, 3, 3], device=cpu_device)
3917
x_dpcpp_i = x_i.to(dpcpp_device).to(dtype)

tests/gpu/examples/test_oob_binary_with_onednn.py

Lines changed: 0 additions & 282 deletions
This file was deleted.

0 commit comments

Comments
 (0)