You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by MajorTom via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/12/06 16:15:01 UTC

[Apache TVM Discuss] [Development/pre-RFC] Tvm integration with external DSP accelerator API


Hello,
I have a task for implementing tvm codegen generating code from relay operators to an external DSP accelerator with has a C API.

The accelerator API include c functions API, such as:

Void f1 (int* a, int* b char* c);

Void f2 (float* a, int_64* b char* c);

Each operator can be matched with one or several DSP API functions, or alternatively Several relay operators can be matched with one or several API accelerator function. 

The issue is that the implementation must be **modular**.

 It should be relatively easy for the user to register relay ops to the corresponding DSP C API functions.
Therefore, I would like to create some sort of data structure/dictionary that will map operators to  corresponding DSP C API functions.

the API can be in python for example. and the user will be able to add a new entry for relay op and 
map it to the external API.

It should also include a function per operator that returns true, depending on input and output type, if it can be implemented with the aforementioned API.

This data structure/dictionary with be used in the codegen.


**Can someone advice how to define create such a data structure/dictionary?**





---
[Visit Topic](https://discuss.tvm.apache.org/t/tvm-integration-with-external-dsp-accelerator-api/11641/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/4aa0ebe51f2bf58321757b91f0214bc32c7f4e319cdd47d506caad5f7b9dbd02).

[Apache TVM Discuss] [Development/pre-RFC] Tvm integration with external DSP accelerator API

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

Sounds like a good case for https://github.com/tlc-pack/relax/issues/46





---
[Visit Topic](https://discuss.tvm.apache.org/t/tvm-integration-with-external-dsp-accelerator-api/11641/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/fd0c72b25ea2d26c1df678e0553eee074bc7bde9bea94eba0a039c4912a41510).

[Apache TVM Discuss] [Development/pre-RFC] Tvm integration with external DSP accelerator API

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

@MajorTom would BYOC + pattern matching against Relay ops work for your use case?





---
[Visit Topic](https://discuss.tvm.apache.org/t/tvm-integration-with-external-dsp-accelerator-api/11641/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/199a8c79a4f85c998e76c8c382ebb6dcdf62eabe305ed465efd0b167ebe2f5de).

[Apache TVM Discuss] [Development/pre-RFC] Tvm integration with external DSP accelerator API

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

Looks like it could be abstracted as calling a packed function...On the low-level you may use `call_packed` as demonstrated [here](https://github.com/apache/tvm/blob/main/tests/python/unittest/test_te_tensor.py#L187); CC @yuchenj on the high-level IR





---
[Visit Topic](https://discuss.tvm.apache.org/t/tvm-integration-with-external-dsp-accelerator-api/11641/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/26c57d9f40fc576ccb49462734840e366dad763804f8852c87060df4bdfa64da).