[RUNTIME] Correctly handling export_module when exporting modules of different type#13489
Merged
tqchen merged 7 commits intoapache:mainfrom Nov 27, 2022
Merged
[RUNTIME] Correctly handling export_module when exporting modules of different type#13489tqchen merged 7 commits intoapache:mainfrom
tqchen merged 7 commits intoapache:mainfrom
Conversation
Collaborator
|
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 |
Member
|
Thanks hongyi. This is a hidden issue as previous behavior will still go through the c export route, and not the llvm one. Which is still correct for small module size. But it will cost long export time for bigger models. cc @jwfromm |
tqchen
requested changes
Nov 27, 2022
tqchen
approved these changes
Nov 27, 2022
gigiblender
pushed a commit
to gigiblender/tvm
that referenced
this pull request
Jan 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the
export_modulefunction assumes that the module and all imported modules have the sametype_key. If we have a host llvm module and some imported c modules, it may fail to set thellvm_target_stringandobject_formatcorrectly, and thus fail to continue with the llvm build flow.In this PR, I set the object format of a mixed-type module to that of the host module, and always set
llvm_target_stringwhen we see a host llvm module.cc: @tqchen @YuchenJin