areusch commented on pull request #7742:
URL: https://github.com/apache/tvm/pull/7742#issuecomment-875270854


   @stoa it might help for us to have a higher-bandwidth discussion on this 
topic (we can place the results in this thread). if you want to contact me on 
the [discord](https://tvm.apache.org/community) we may be able to come to a 
plan more quickly. 
   
   initially my thoughts were that, since this PR was contributing a new 
implementation of c_backend_api and the API surface was considerably different 
than what is in `src/runtime/micro`, there were enough pieces similar to 
`src/runtime/crt` that it made sense to place it with the CRT. however, as 
we've been aligning on this PR, it now seems like we've been able to 
accommodate any platform differences for STM32 using the standard TVM C runtime 
plus the TVMPlatform APIs. i think this PR now has these pieces:
   1. a code generator to produce the STM32-facing API from a Model Library 
Format artifact
   2. implementation of the TVMPlatform APIs
   3. implementations of the types used by STM32 API
   4. unit tests for the above
   
   So now it seems like pieces 1-3 more naturally belong alongside those for 
the other microTVM platforms (Zephyr and Arduino (soon)). With the [Project API 
PR](https://github.com/apache/tvm/pull/8380), it's proposed to move that code 
to `apps/microtvm/<platform>`. I'm happy to consider other proposals for where 
it should live, too. Or, if you plan to contribute more pieces later on that 
might change the picture a bit, we could consider another home for this code.
   
   I did want note that although support for these platforms is 
compartmentalized outside of `src` in the TVM codebase, we still test them as 
much as is feasible in the TVM CI so that we can consider them first-class 
integrations of TVM. There is precedent in TVM for doing this (e.g. 
`apps/bundle_deploy`, which is the recommended way to build a static POSIX 
binary to deploy TVM code), so I would think that the CI should protect them 
from bitrot.
   
   Another benefit is that it places all of the stm-specific code in a single 
location. this makes it easier for reviewers to tell when to CC you guys on PRs 
that originate from the community but which modify the STM32 code. TVM doesn't 
have a codified 
[CODEOWNERS](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners)
 but it still nonetheless helps to have clearly-delineated code.
   
   Let me know what you think--it'd be great to align on this last piece!
   
   -Andrew


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to