Skip to content

Commit f22958e

Browse files
committed
add testcase
1 parent 3c7adfb commit f22958e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/python/relax/test_frontend_from_fx.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,10 +3029,14 @@ def forward(self, x):
30293029
def test_permute():
30303030
input_info = [([1, 2, 3, 4], "float32")]
30313031

3032-
class Permute(Module):
3032+
class Permute1(Module):
30333033
def forward(self, x):
30343034
return x.permute(0, 3, 2, 1)
30353035

3036+
class Permute2(Module):
3037+
def forward(self, x):
3038+
return torch.permute(x, (0, 3, 2, 1))
3039+
30363040
@tvm.script.ir_module
30373041
class expected1:
30383042
@R.function
@@ -3046,7 +3050,8 @@ def main(
30463050
R.output(gv)
30473051
return gv
30483052

3049-
verify_model(Permute(), input_info, {}, expected1)
3053+
verify_model(Permute1(), input_info, {}, expected1)
3054+
verify_model(Permute2(), input_info, {}, expected1)
30503055

30513056

30523057
def test_reshape():

0 commit comments

Comments
 (0)