@andrew_sto Apologies for missing this post.
First you might take a look at the Project API as this has now landed and obsoleted Compiler/Flasher.
Your approach should work, but I don’t think we want to ultimately take the dma_copy pragma approach in main
for the c
backend. We currently don’t model DMA in the TVM C runtime. In the C++ runtime, we can leverage it in a limited capacity via Device API. We do have a concept, storage_scope
, which can be used in a limited fashion to model different memory scopes. In [RFC] Unified Static Memory Planning, @manupa-arm is implementing modeling of memories and this modeling will use the same identification method as storage_scope
. Following this change, it should be possible then to describe memory-to-memory transfers and DMA properly with the C Device API.
The [pre-RFC] C Device API is the best way to do this once it lands. We don’t currently have good support for this, but you might be able to do something by leveraging .parallel() and implementing your own launch hook using tir.call_extern
. It would be a bit of a hack.
This is something we want to provide but currently can only provide scratchpad information. Once USMP lands, we will provide this as a compiler output.
Hope this helps. Please feel free to update on any new concerns you might have!
Thanks,
Andrew