[Apache TVM Discuss] [Questions] Relay cannot compile while_loop

2020-10-26 Thread Hao Luo via Apache TVM Discuss
Thank you very much. I have understand it --- [Visit Topic](https://discuss.tvm.apache.org/t/relay-cannot-compile-while-loop/8294/3) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/em

[Apache TVM Discuss] [Questions] Relay cannot compile while_loop

2020-10-26 Thread masahi via Apache TVM Discuss
You cannot use `relay.build(...)` to build a model with control flow. For that, you need to use VM. See for example, https://github.com/apache/incubator-tvm/blob/efe3a79aacd934ea5ffb13170230bf199a473e72/tests/python/frontend/pytorch/test_forward.py#L1914 --- [Visit Topic](https://discu

[Apache TVM Discuss] [Questions] Relay cannot compile while_loop

2020-10-26 Thread Hao Luo via Apache TVM Discuss
I want to test the usage of relay while_loop and write the following simple example ``` x = relay.var("x", shape=(10, 20)) i = relay.var("i", shape=tuple(), dtype="int32") def myfun(x, i): z = relay.add(x, relay.const(1, "float32")) j = relay.add(i, relay.const(1, "in