Skip to content

Commit 00c9126

Browse files
committed
add a testcase for call_function
1 parent 432f305 commit 00c9126

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/python/relax/test_frontend_from_fx.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,13 @@ def __init__(self):
753753
def forward(self, input):
754754
return self.pool(input)
755755

756+
class MaxPool2d_functional(Module):
757+
def __init__(self):
758+
super().__init__()
759+
760+
def forward(self, input):
761+
return torch.nn.functional.max_pool2d(input, kernel_size=[1, 1])
762+
756763
@tvm.script.ir_module
757764
class expected1:
758765
@R.function
@@ -835,6 +842,7 @@ def main(
835842
verify_model(MaxPool2d(), input_info, {}, expected1)
836843
verify_model(MaxPool2d2(), input_info, {}, expected2)
837844
verify_model(MaxPool2d3(), input_info, {}, expected3)
845+
verify_model(MaxPool2d_functional(), input_info, {}, expected1)
838846

839847

840848
def test_avgpool2d():

0 commit comments

Comments
 (0)