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

[microNPU] Fix Cascader code generation without StorageRewrite #13365

Merged

Conversation

Aleksei-grovety
Copy link
Contributor

@Aleksei-grovety Aleksei-grovety commented Nov 14, 2022

This PR fixes Cascader code generation without StorageRewrite (when striping is enabled) on Ethos-U NPU.
The problem was that after the Replace Operator's pass, the buffers for partial results of the operation were replaced with a buffer with the results of the entire operation and it was indicated that the buffer needed to be allocated, summing up we received a larger size in the number of parts.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Nov 14, 2022

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

@Aleksei-grovety
Copy link
Contributor Author

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for tracking this down! I suppose we want to wait for #13369 before merging?

@Aleksei-grovety
Copy link
Contributor Author

Aleksei-grovety commented Nov 16, 2022

Looks great, thanks for tracking this down! I suppose we want to wait for #13369 before merging?

Yes, with these changes, the test will not be changed.

There were extra memory allocations for buffers when parts of the buffer for the result were replaced with a buffer for the entire result (in ReplaceOperators pass)
summing up we received a larger size in the number of parts
@Aleksei-grovety Aleksei-grovety force-pushed the ethosu-cascader-without-storagerewrite branch from a97223f to 067a3c8 Compare November 18, 2022 07:00
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

LGTM!

@ekalda ekalda merged commit 37a8855 into apache:main Nov 18, 2022
@ekalda
Copy link
Contributor

ekalda commented Nov 18, 2022

Thanks @alexey-yazev!

xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…e#13365)

There were extra memory allocations for buffers when parts of the buffer for the result were replaced with a buffer for the entire result (in ReplaceOperators pass)
summing up we received a larger size in the number of parts
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.

3 participants