-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[AOT] BugFix of workspace calculation #10337
Merged
Merged
Conversation
This file contains 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
manupak
requested review from
jroesch,
slyubomirsky,
icemelon,
MarisaKirisame,
ZihengJiang,
yzhliu,
vinx13,
mbrookhart,
jwfromm,
zhiics,
anijain2305,
wweic,
junrushao,
comaniac,
tqchen,
areusch and
merrymercy
as code owners
February 21, 2022 18:27
manupak
force-pushed
the
micronpu_usmp_followup
branch
from
February 21, 2022 18:38
6e30c3c
to
1f84d4e
Compare
cc : @Mousius |
manupak
force-pushed
the
micronpu_usmp_followup
branch
from
February 22, 2022 14:44
1f84d4e
to
0e8dce9
Compare
manupak
requested review from
liangfu,
tmoreau89,
masahi,
kazum,
kparzysz-quic and
Hzfengsy
as code owners
February 22, 2022 14:44
Mousius
approved these changes
Feb 22, 2022
@@ -34,7 +34,7 @@ extern float output_storage[12]; | |||
|
|||
extern const size_t output_len; | |||
|
|||
static uint8_t g_crt_workspace[TVMGEN_DEFAULT_WORKSPACE_SIZE + 512]; | |||
static uint8_t g_crt_workspace[TVMGEN_DEFAULT_WORKSPACE_SIZE]; |
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.
❗
manupak
force-pushed
the
micronpu_usmp_followup
branch
2 times, most recently
from
February 22, 2022 19:16
ee4fe4f
to
53dcb54
Compare
Following an investigation from apache#10022, it turns out, currently the workspace calculation assumes there would be a single lowered PrimFunc could be produced per primitive Relay Function. However, the exception turned out to be the CMSIS-NN codegen that produces multiple calls/PrimFuncs in the place of a single call to single relay PrimFunc. This commit adds changes to workspace calculation to be done on lowered IRModule. Additionally, changes the test utils to not to generate any stack allocator code when USMP is used to make the tests more strict. This change also removes the confusing "run_model" which has semantics identitical to "__tvm_main__" in TIR. Change-Id: I5202d9cc7c6a8c00c73791b82df062a8e13dd224
* fix arduino template Change-Id: Ic53a73fa5a964300daff7a818fdb96cfa6e1efed
* fix USMP unit tests after main symbol change Change-Id: I1536d00bf7fe421e7e040ace9a590dd915f13339
* fix c device api tests * revert back to greedy in simple memory tests Change-Id: Ie7d75db80267e891ff6044e850516c9d439790a4
manupak
force-pushed
the
micronpu_usmp_followup
branch
from
February 23, 2022 04:22
ac19385
to
949b7f0
Compare
cc : @leandron |
This is green now :D ! |
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
Following an investigation from apache#10022, it turns out, currently the workspace calculation assumes there would be a single lowered PrimFunc could be produced per primitive Relay Function. However, the exception turned out to be the CMSIS-NN codegen that produces multiple calls/PrimFuncs in the place of a single call to single relay PrimFunc. This commit adds changes to workspace calculation to be done on lowered IRModule. Additionally, changes the test utils to not to generate any stack allocator code when USMP is used to make the tests more strict. This change also removes the confusing "run_model" which has semantics identitical to "__tvm_main__" in TIR.
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.
Following an investigation from #10022,
it turns out, currently the workspace
calculation assumes there would only be a single
lowered PrimFunc be produced per
primitive Relay Function.
However, the exception turned out to
be the CMSIS-NN codegen that produces
multiple calls/PrimFuncs in the place
of a single call to single relay PrimFunc.
This commit adds changes to workspace
calculation to be done on lowered IRModule.
Additionally, changes the test utils to
not to generate any stack allocator code
when USMP is used to make the tests more
strict.