Skip to content
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

[Bug] StandaloneCrt.cmake limits ability to enable microTVM build on other platforms #13533

Closed
alanmacd opened this issue Dec 1, 2022 · 0 comments · Fixed by #13600
Closed
Labels
type: bug vert:micro MicroTVM: src/runtime/micro, src/runtime/crt, apps/microtvm

Comments

@alanmacd
Copy link
Contributor

alanmacd commented Dec 1, 2022

Expected behavior

When enabling the USE_MICRO build flag, builds complete successfully on various platforms.

Actual behavior

Enabling USE_MICRO build flag can be problematic on various platforms, including Windows (worked-around for now), MacOS, and other cross-compilation environments.

Details

StandaloneCrt.make builds a number of libraries when USE_MICRO is enabled. The object files and libraries are written to the host_standalone_crt directory in the TVM build directory. Only one of those libraries, libmicrotvm_rpc_common, is linked into the TVM runtime library. The other libraries in host standalone_ crt are built only to assure they are still buildable.

Additionally, StandaloneCrt.make copies a number of source files to the standalone_ crt in the build directory for use later by the microTVM Project API server as well as for building the libraries mentioned above.

The issue is that the both the makefile used to build those libraries as well as the commands to link in libmicrotvm_rpc_common to TVM in StandaloneCrt.cmake are tailored to only support GCC (or clang) and can cause issues on other platforms or in cross-compilation environments.

@alanmacd alanmacd added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Dec 1, 2022
@areusch areusch added vert:micro MicroTVM: src/runtime/micro, src/runtime/crt, apps/microtvm and removed needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it labels Dec 1, 2022
mehrdadh pushed a commit that referenced this issue Jan 5, 2023
Build standalone_crt with cmake instead of makefile to allow for better portability of microTVM code to other build environments.

fixes #13533
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this issue Mar 27, 2023
…e#13600)

Build standalone_crt with cmake instead of makefile to allow for better portability of microTVM code to other build environments.

fixes apache#13533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug vert:micro MicroTVM: src/runtime/micro, src/runtime/crt, apps/microtvm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants