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 mh via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/05/25 11:55:02 UTC

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime


TVM_REGISTER_GLOBAL("ir.RegisterOpLowerIntrinsic") in src/ir/op.cc should be built for runtime. Without building this file the VTA won't run after [PR #7809](https://github.com/apache/tvm/pull/7809/). This has sth to do with [Problem - RPC server on ZCU104](https://discuss.tvm.apache.org/t/problem-rpc-server-on-zcu104/9881). CMakefiles should be fixed for this.

Details: those three functions in vta/python/vta/environment.py are decorated by @register_intrin_lowering after the PR, which locates in python/tvm/ir/op.py and depends on _ffi_api, which loads the very function in src/ir/op.cc ,which seems not built with runtime only. Full build of course we won't have this problem.





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/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/9cbf7e82c2f3b9890c826cb0a8dde552fb27fea1f2550825108bd7ab87fbf955).

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime

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

I see. @pr3dat0r2k would you mind sharing the error message and the name of the unittest that failed?





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/6) 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/be95c7a46a77ec4b59363d2efa9bf5ed657f9b1b1f610796631b1151a905089f).

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime

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

true but if you dont build the whole tvm on board the vta simply wont run





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/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/ec9c98662581571be12c2820c11dea11f78e14d72f74ac538a0489c15ce4f9a8).

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime

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

`src/runtime/` is built for runtime, `src/ir/` is used for unified IR, which is part of the compiler





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/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/145b1bd67d244117c19d4c154858856d2fe76dae16aa5ac263673b16303e6d9b).

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime

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

[quote="junrushao1994, post:4, topic:10084"]
we could simply ignore the error when registration function is not found.
[/quote]

maybe not. i tried 1.delete these three functions 2.use the older register_func version. both of these failed the vta gemm test. the host side of tvm cannot identify the func tir.vta.coproc_dep_push blablabla(this might have sth to do with the host side of the tvm which is a bit older and dont have this commit, but it seems that the gemm test do need these functions to be registered correctly)





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/5) 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/16543b41daf7075d821a6ea3a7ca49f2322c09fd29ce6dc14e805200a79e083f).

[Apache TVM Discuss] [Questions] ir.RegisterOpLowerIntrinsic seems not built for runtime

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

Thanks for the explanation!  Now I could understand.

The original mechanism for intrinsic lowering uses `tvm.register_func`, which is implemented in the TVM runtime, while the new `register_intrin_lowering ` is instead implemented in the TVM compiler, which will throw out an error when if the TVM is a runtime-only build.

This file is loaded regardless of TVM is built fully or runtime-only, which causes the issue you mentioned: https://github.com/apache/tvm/blob/main/vta/python/vta/environment.py. To address this issue, we could simply ignore the error when registration function is not found.

A PR is more than appreciated! CC: @zxybazh





---
[Visit Topic](https://discuss.tvm.apache.org/t/ir-registeroplowerintrinsic-seems-not-built-for-runtime/10084/4) 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/56a705a09f5a47df3a6698d3d5f8c23e6333dd28da1e431bd5be719bc7b45a74).