Skip to content

Commit

Permalink
[ET-VK] Manually sync internal and OSS (pytorch#7365)
Browse files Browse the repository at this point in the history
ghstack-source-id: 391954d7ac7680d63f12316f5230d06d6ff3bf62
Pull Request resolved: pytorch#7364
  • Loading branch information
SS-JIA authored Dec 18, 2024
1 parent a63c375 commit 49cc399
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions backends/vulkan/test/test_vulkan_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,35 @@ def forward(self, x):
(torch.tensor([[[0, 1], [0, 1]], [[4, 2], [3, 3]]]),),
)

# def test_vulkan_backend_conv_with_dim_order(self):
# class Conv2dSequential(torch.nn.Module):
# def __init__(self, bias=True, channel_last=False):
# super().__init__()
# self.first = torch.nn.Conv2d(
# in_channels=1,
# out_channels=3,
# kernel_size=(3, 3),
# padding=1,
# bias=bias,
# )
# self.second = torch.nn.Conv2d(
# in_channels=3,
# out_channels=2,
# kernel_size=(3, 3),
# padding=1,
# bias=bias,
# )

# def forward(self, x):
# x = x.to(memory_format=torch.channels_last)
# return self.second(self.first(x))

# self.lower_module_and_test_output(
# Conv2dSequential(),
# (torch.rand(size=[1, 1, 3, 3]),),
#
# )

def test_vulkan_backend_flip(self):
class FlipModule(torch.nn.Module):
def __init__(self):
Expand Down Expand Up @@ -1654,32 +1683,3 @@ def forward(self, x):
GridPriorsModule(),
(torch.rand(size=[1, 5, 2, 3]),),
)

# def test_vulkan_backend_conv_with_dim_order(self):
# class Conv2dSequential(torch.nn.Module):
# def __init__(self, bias=True, channel_last=False):
# super().__init__()
# self.first = torch.nn.Conv2d(
# in_channels=1,
# out_channels=3,
# kernel_size=(3, 3),
# padding=1,
# bias=bias,
# )
# self.second = torch.nn.Conv2d(
# in_channels=3,
# out_channels=2,
# kernel_size=(3, 3),
# padding=1,
# bias=bias,
# )

# def forward(self, x):
# x = x.to(memory_format=torch.channels_last)
# return self.second(self.first(x))

# self.lower_module_and_test_output(
# Conv2dSequential(),
# (torch.rand(size=[1, 1, 3, 3]),),
#
# )

0 comments on commit 49cc399

Please sign in to comment.