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 randy via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/07/02 06:52:10 UTC

[Apache TVM Discuss] [Questions] Add new backend to TVM


Hi all,
we design an NPU for our SOC which is not like VTA, how should we do to run TVM on this AI core?
 this NPU has its own ISA, but we have not yet implemented any LLVM backend for it.
 anyone can give the suggestion(guide) that the main steps(tasks) to enable TVM running on the chip?
Thanks for any reply!





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/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/df7f2d779acbfc68944d9ad42970c96a667099406c4645b9d31737c952070dd0).

[Apache TVM Discuss] [Questions] Add new backend to TVM

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

thanks for your suggestion! I will read the tvm source code for more information.





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/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/086c6e05e5e749f2cef4f71c3583d16dc661642515dae0f8ad80223e036eddae).

[Apache TVM Discuss] [Questions] Add new backend to TVM

Posted by "Cody H. Yu via Apache TVM Discuss" <no...@discuss.tvm.ai>.

See this blog post about BYOC: https://tvm.apache.org/2020/07/15/how-to-bring-your-own-codegen-to-tvm

For more examples, you can search "BYOC" in pull request titles of the upstream TVM. Usually the PR with title `[BYOC] XXX integration` is the one that introduces a new backend.





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/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/e4ac978d7c43909423a8b1cb6a8e4072b162c97d33d354f9517445789633fe35).

[Apache TVM Discuss] [Questions] Add new backend to TVM

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

Thanks for your reply so much!
But I'm a little confused about your answer, sorry for my ignorance about DNN compiler.
1) > Firstly, you should implement your own quantization algorithm...

what's mean about "quantization algorithm", and what for?

2)   Is there any prject or example about adding new backend for reference?
Thanks again!





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/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/cc868bb13c9fa40158d7178c8d71b8b1e8272767d4ad5a584dd3a45bad56c42f).

[Apache TVM Discuss] [Questions] Add new backend to TVM

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

I assume you don't have your own NPU accelerate library, so you couldn't go TVM BYOC.

Firstly, you should implement your own quantization algorithm based on your NPU (not all operation / data type could be provided on your NPU, like int64)

Secondly, you should consider provide your own relay graph passes for better support on your chip (for example, your NPU have some restrict on operator support / your NPU have own data layout support and so on)

Thirdly, you should implement your NPU's TVM passes and (maybe) your own schedule primitive (for example your NPU own memory memory hierarchy) 

Fourthly, you should complete code generation. You mention you don't have LLVM BE currently. All right, you should consider implement your own code generation for TIR (for example emit assembly instruction directly).

Fifthly, you should communicate with NPU driver team and co-design API so that we know how to load the compiled binary. This will impact how we design or change TVM runtime component to suit for your NPU.





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/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/7efe9823188eb0c4b5bf2b96aeb3e2459c0b9e44769c0616fdee1b99b576ffba).

[Apache TVM Discuss] [Questions] Add new backend to TVM

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

Hello, We are also working on this. Perhaps we can discuss and learn this progress together?





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/8) 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/e45cb201748151a7eead29ad56ffe64c11f0cc6e2e8cd34844c1b4c06e5dc0f8).

[Apache TVM Discuss] [Questions] Add new backend to TVM

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

@chiuchiu , Hello, have you solved this problem? I want to get some suggestions





---
[Visit Topic](https://discuss.tvm.apache.org/t/add-new-backend-to-tvm/10373/7) 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/7814571015ee6b298fdacadd0bef3761a109b2f6b9e0baa79537072e2cfbfce8).