Skip to content

Conversation

@alanmacd
Copy link
Contributor

@alanmacd alanmacd commented Feb 3, 2023

Additional changes that make it possible to enable USE_MICRO across nearly all builds except for hexagon or when USE_RPC is disabled. This mainly standardizes how the microTVM RPC common files are built across all platforms. There will be a follow-up PR that will enable USE_MICRO for nearly all build types once the best mechanism and behaviors for doing so is determined.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 3, 2023

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

@alanmacd alanmacd changed the title [microTVM] unify windows build cmake for standalone crt [microTVM] enable USE_MICRO for most builds Feb 10, 2023
@alanmacd alanmacd marked this pull request as ready for review February 13, 2023 21:18
@alanmacd alanmacd changed the title [microTVM] enable USE_MICRO for most builds [microTVM] additional refactoring for enabling USE_MICRO in more builds Feb 14, 2023
int TVMDeviceFreeDataSpace(DLDevice dev, void* ptr) { return TVMPlatformMemoryFree(ptr, dev); }

static bool IsContiguous(const DLTensor* arr) {
TVM_ATTRIBUTE_UNUSED static bool IsContiguous(const DLTensor* arr) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify why this was needed? was it for eliminating the warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsContiguous() is only used in an assert() below, so in a non-debug build we get an unused function warning

Copy link
Member

@mehrdadh mehrdadh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just waiting for others to take a look as well

@mehrdadh mehrdadh merged commit f6cebb5 into apache:main Feb 14, 2023
src/runtime/crt/microtvm_rpc_common/session.cc
src/runtime/crt/microtvm_rpc_common/write_stream.cc)
list(APPEND RUNTIME_SRCS ${TVM_CRT_SOURCES})
include_directories(SYSTEM src/runtime/micro)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the SYSTEM here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it needs a header in that directory to build those files that are in TVM_CRT_SOURCES, it's the same pattern used in other .cmake and CmakeLists.txt

@alanmacd alanmacd deleted the windows-build-use-micro branch February 16, 2023 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants