-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[microTVM]Refactor crt_config.h header file generation #13955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
a44ddd3 to
bc1d597
Compare
bc1d597 to
788373c
Compare
|
cc @alanmacd @mkatanbaf for review |
3963745 to
3b30d57
Compare
| /*! | ||
| * \file tvm/runtime/crt_config.h.template | ||
| * \brief Template for CRT configuration, to be modified on each target. | ||
| /*! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: something happened with spacing and slashes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this
.gitignore
Outdated
|
|
||
| # GDB history file | ||
| .gdb_history | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it makes sense to output these files into the build/ directory and add that directory as an include instead of putting these files into the source tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I moved all the crt_config.h files under apps/microtvm, just need to figure out the file under src/runtime/micro directory.
| if (g_num_bytes_in_rx_buffer > RING_BUF_SIZE_BYTES) { | ||
| TVMPlatformAbort((tvm_crt_error_t)0xbeef3); | ||
| } | ||
| // if (g_num_bytes_in_rx_buffer > RING_BUF_SIZE_BYTES) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented code if not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for catching this, uncommented it.
| import logging | ||
| from tvm.relay.backend import Runtime | ||
| from tvm.contrib import cc as _cc | ||
| from tvm.micro import copy_crt_config_header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this add a dependency on USE_MICRO being enabled that wasn't here previously, should this be conditional on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these tests were already executed with the assumption of USE_MICRO=ON
check this file: tests/scripts/task_microtvm_cpp_tests.sh
9650e62 to
9efb455
Compare
Add CMake module for crt_config
9efb455 to
95131c3
Compare
95131c3 to
da9f700
Compare
4e0e6fe to
d5bc32a
Compare
d5bc32a to
900a023
Compare
areusch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @mehrdadh !
This PR:
configure_filefunc to generate in build