You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by Windclarion via TVM Discuss <no...@discuss.tvm.ai> on 2020/04/13 02:34:53 UTC

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface


const unsigned char __tvm_dev_mblob[46788038] = {"TVM_BLOB_SIG"}; maybe not enough. because 46788038 is too big for many embedded system, so I have to place  __tvm_dev_mblob to special section, for example, a rodata section.  so   I  mean  I need declare __tvm_dev_mblob as const unsigned char __tvm_dev_mblob[46788038] __attribute__((section(".rodata")));  the  declaration grammar is compiler specific, put to which section is compiler specific too. so I think the RFC need to consider the case.





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/52) to respond.

You are receiving this because you enabled mailing list mode.

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

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

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

I got it.  Thanks FrozenGene.





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/56) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/f59a23d9e22aa71eed208ef9c3765027293b71f153861e3a4427669acee9ac1e).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

ok make sense. if all agree, we could improve our fallback way to make tvm blob in the rodata section





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/62) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/f6c278f2da4444806f11a655d1d4c19ea6e2e07b1187c9ab1eece37e77139fbd).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Ramana Radhakrishnan via TVM Discuss <no...@discuss.tvm.ai>.

I wasn't proposing that as a solution, that is one of the options. I'm merely stating that this is still a problem that will hit others most notably anyone using the C backend  .

Ramana





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/61) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/2044a6e069efc5cbd7b4a67a1c7bc2c3465de2a8ebde9f85ce012dc0320f8c11).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

I think I should clarify your question. Do you mean we should generate .rodata section of `unsighed char __tvm_data_blob[]`?





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/60) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/c2048539a9a3cfcd92779df17b4d91373aa975a6dff0f720067a0ae634d5c00f).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Ramana Radhakrishnan via TVM Discuss <no...@discuss.tvm.ai>.

So, the problem hasn't been fixed : there is a "solution" depending on the presence of an llvm target.

Ramana





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/59) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/4b98f32ef2bc93506bdac3f0bd906b3d0848fa0cffeb3160eeac5e6d6197314e).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

When we don’t have LLVM, we will fallback to our original way (call compiler to generate)





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/58) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/073c2c59f0f4fc849ff145be542dab6d6b35903e0527e8a1084ed6e364133229).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Ramana Radhakrishnan via TVM Discuss <no...@discuss.tvm.ai>.

This won't work by default for the C backend where we don't necessarily rely on the presence of llvm or are we saying that there needs to be an llvm solution for the backend just to produce this constant data object always, so we do need a general solution ....


Ramana





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/57) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/a428ad271f9d4ca0bb2684a29ed4ed1e729a89816061a1cfe2944334cc0586cc).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

CUDA also could use this. Because cuda's target host is LLVM. As the example I show, it is in fact cuda target. So you could see `NVIDIA NNVM Compiler` in the constant string.





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/55) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/ce7efb7903b8451222030bb9f082a816040941c136c4230783936e00f428902c).

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

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

Good solution!   Thanks FrozenGene!  but if we use LLVM, llvm series target can take advantage of this solution,  I'm not sure if other targets such as  cuda can use this solution.





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/54) to respond.

You are receiving this because you enabled mailing list mode.

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

[TVM Discuss] [Development/RFC] [DISCUSS] Module based Model Runtime Interface

Posted by Zhao Wu via TVM Discuss <no...@discuss.tvm.ai>.

Thanks for respond.Finally, we don't use this special hack. We will generate this directly using LLVM IR. And LLVM will put this into `rodata` section correctly. 

Like this test:
![image|690x165](upload://nkm1SoLvI1b36CZyZHWAIRUd7bi.png) 

![image|690x397](upload://pXekhJ0Qe1ilLipMCtLW5JCP3DP.png)





---
[Visit Topic](https://discuss.tvm.ai/t/discuss-module-based-model-runtime-interface/5025/53) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/4160e15af6d4efd9539f9af0abf808dce916907bb9890b9fca192cea36e97f80).