Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conv2d e2e test from convnext model #3899

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions projects/pt1/python/torch_mlir_e2e_test/test_suite/conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,38 @@ def Convolution2DStaticModule_basic(module, tu: TestUtils):
module.forward(tu.rand(3, 3, 10, 10), tu.rand(3, 3, 2, 2))


class Convolution2DNextStaticModule(torch.nn.Module):
def __init__(self):
super().__init__()

@export
@annotate_args(
[
None,
([1, 80, 72, 72], torch.float32, True),
([80, 1, 7, 7], torch.float32, True),
([80], torch.float32, True),
]
)
def forward(self, inputVec, weight, bias):
return torch.ops.aten.convolution(
inputVec,
weight,
bias=bias,
stride=[1, 1],
padding=[3, 3],
dilation=[1, 1],
transposed=False,
output_padding=[0, 0],
groups=80,
)


@register_test_case(module_factory=lambda: Convolution2DNextStaticModule())
def Convolution2DNextStaticModule_basic(module, tu: TestUtils):
module.forward(tu.rand(1, 80, 72, 72), tu.rand(80, 1, 7, 7), tu.rand(80))


class Convolution2DStridedModule(torch.nn.Module):
def __init__(self):
super().__init__()
Expand Down
Loading