You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Haoyang Ma via Apache TVM Discuss <no...@discuss.tvm.ai> on 2022/02/26 09:36:11 UTC

[Apache TVM Discuss] [Questions] InferType crashes when a relay function call another function


When I play with relay, I meet the following unexpected crash caused by `InferType`. Below is my script,
```
import tvm
from tvm import relay
mod = tvm.IRModule()

x1 = relay.var("x1", dtype='float64', shape=())
y1 = relay.log(x1)
tuple = relay.Tuple([y1])
F1 = relay.Function([x1], tuple)
mod['F1'] = F1

x2 = relay.var("x2", dtype='float64', shape=())
f = mod.get_global_var('F1')
y2 = f(x2)
F2 = relay.Function([x2], y2)
mod['main'] = F2
print(mod)

mod = relay.transform.InferType()(mod)
print(mod)
```
And the crash message generated by `TVM_BACKTRACE=1` is 
![3|690x340](upload://4RWUfamwVQRDB5o7W1dnASvR2LV.png) 
I am not sure if it's my fault to cause this problem. Could any expert give me a hint? Thanks in advance.





---
[Visit Topic](https://discuss.tvm.apache.org/t/infertype-crashes-when-a-relay-function-call-another-function/12176/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/75f86fd08f405b376efaed388093fb9f62f62267a0197cccb0db2401e1e4cdb7).

[Apache TVM Discuss] [Questions] InferType crashes when a relay function call another function

Posted by Haoyang Ma via Apache TVM Discuss <no...@discuss.tvm.ai>.

I open an issue in github [[Bug] InferType crashes when a relay function calls an global identity function · Issue #10398 · apache/tvm (github.com)](https://github.com/apache/tvm/issues/10398). The example here is more concrete. I think it maybe a bug.





---
[Visit Topic](https://discuss.tvm.apache.org/t/infertype-crashes-when-a-relay-function-call-another-function/12176/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/8b3d2ee9282f7bbc0fa0f294dbe37eb7bef69eb723272be426f1886d7a5893af).

[Apache TVM Discuss] [Questions] InferType crashes when a relay function call another function

Posted by Klopp via Apache TVM Discuss <no...@discuss.tvm.ai>.

I have commit a fix in [here](https://github.com/apache/tvm/pull/10447). Could any developer take a check on my fix? This is my first time to submit a patch and I am not sure if I make it correctly with my shallow understanding of TVM.





---
[Visit Topic](https://discuss.tvm.apache.org/t/infertype-crashes-when-a-relay-function-call-another-function/12176/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/email/unsubscribe/4d6818c27cdec0a5f0369c5e2b1e4a65d23705a7efc5747c5b3c89c2cab03e6e).