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

[ETHOSN] Get buffer sizes from the compiled network #12160

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

lhutton1
Copy link
Contributor

The NPU support library compiler sometimes adds padding to input tensors which means the buffer sizes calculated at runtime can sometimes be smaller than necessary. Instead, buffer sizes are now collected at compile time and passed to the runtime so that they match the sizes expected by the compiled network. This was seen when running a fully connected operation with an input that is not a multiple of 1024, so testing has been added to cover this case.

Additionally changed the fully connected test case to use pytest parameterization as part of a general cleanup, and fixed the fully connected testing to support output channels > 1.

cc @Leo-arm @manupa-arm @leandron

The NPU support library compiler sometimes adds padding to input
tensors which means the buffer sizes calculated at runtime can
sometimes be smaller than necessary. Instead, buffer sizes are now
collected at compile time and passed to the runtime so that they match
the sizes expected by the compiled network. This was seen when running
a fully connected operation with an input that is not a multiple of
1024, so testing has been added to cover this case.

Additionally changed the fully connected test case to use pytest
parameterization as part of a general cleanup, and fixed an issue
with specifying a different output shape and weights with more than 1
output channel.

Change-Id: Iad319d75326b9ac41950de982603660a084dc27b
@lhutton1
Copy link
Contributor Author

lhutton1 commented Aug 4, 2022

friendly ping for review

Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

LGTM!

@manupak manupak merged commit 3731a8c into apache:main Aug 4, 2022
@manupak
Copy link
Contributor

manupak commented Aug 4, 2022

Thanks @lhutton1 @NicolaLancellotti!

@lhutton1 lhutton1 deleted the fix-buffer-size branch August 4, 2022 13:35
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
The NPU support library compiler sometimes adds padding to input
tensors which means the buffer sizes calculated at runtime can
sometimes be smaller than necessary. Instead, buffer sizes are now
collected at compile time and passed to the runtime so that they match
the sizes expected by the compiled network. This was seen when running
a fully connected operation with an input that is not a multiple of
1024, so testing has been added to cover this case.

Additionally changed the fully connected test case to use pytest
parameterization as part of a general cleanup, and fixed an issue
with specifying a different output shape and weights with more than 1
output channel.

Change-Id: Iad319d75326b9ac41950de982603660a084dc27b
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