Commit 3f16829a by 雾雨魔理沙 Committed by Jared Roesch

fix test (#3525)

parent b5a746d2
...@@ -100,17 +100,16 @@ def test_if(): ...@@ -100,17 +100,16 @@ def test_if():
def test_recursion(): def test_recursion():
""" """
Program: Program:
let sum_twice(n: i32) -> i32 = { let f(n: i32) -> i32 = {
m = (n * 2) m = (n * 2)
if (n == 0) { if (n == 0) {
return m; return m;
} else { } else {
return m + sum(n - 1); return m + f(n - 1);
} }
} }
sum_twice(5); f(5);
""" """
return # cannot be run as fuse_ops need to recursively visit
mod = relay.Module() mod = relay.Module()
i64 = relay.TensorType((), 'int64') i64 = relay.TensorType((), 'int64')
f = relay.GlobalVar("f") f = relay.GlobalVar("f")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment