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

[4a/10] [CMSIS-NN] Calculate CMSIS-NN buffer size with respect to architecture extensions #9338

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Oct 21, 2021

This correctly calculates the buffer sizes for a variety of targets based on the -mcpu and -mattr flags passed to the cmsis-nn code generator.

Added for Conv2d, Depthwise Conv2d and Average Pool.

@Mousius
Copy link
Member Author

Mousius commented Oct 21, 2021

CC @ashutosh-arm @manupa-arm

@Mousius Mousius force-pushed the cmsisnn-buffer-calculations branch from b468ff7 to c347020 Compare October 21, 2021 08:58
@Mousius Mousius changed the title [CMSIS-NN] Calculate Conv2d buffer size with respect to architecture extensions [4a/10] [CMSIS-NN] Calculate Conv2d buffer size with respect to architecture extensions Oct 21, 2021
Copy link
Contributor

@ashutosh-arm ashutosh-arm left a comment

Choose a reason for hiding this comment

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

Thanks Chris! LGTM. Some minor comments in there.

This correctly calculates the buffer sizes for a variety of targets
based on the `-mcpu` and `-mattr` flags passed to the `cmsis-nn` code
generator.

Added for Conv2d, Depthwise Conv2d and Average Pool.
@Mousius Mousius force-pushed the cmsisnn-buffer-calculations branch from 9795a5b to 11a2dad Compare December 29, 2021 15:35
@Mousius Mousius requested a review from icemelon as a code owner December 29, 2021 15:35
@Mousius Mousius changed the title [4a/10] [CMSIS-NN] Calculate Conv2d buffer size with respect to architecture extensions [4a/10] [CMSIS-NN] Calculate CMSIS-NN buffer size with respect to architecture extensions Dec 29, 2021
ASSERT_EQ(depthwise_conv2d_with_channels(kHasDSP, 4, 6), 0);
ASSERT_EQ(depthwise_conv2d_with_channels(kHasDSP, 8, 7), 0);
ASSERT_EQ(depthwise_conv2d_with_channels(kHasMVE, 4, 6), 0);
ASSERT_EQ(depthwise_conv2d_with_channels(kHasMVE, 8, 7), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

I like it that you have included multiples of 4 cases here for channel 😄

@ashutosh-arm
Copy link
Contributor

ashutosh-arm commented Jan 4, 2022

Thanks @Mousius for this support and also taking care of adding the buffer support for all the other layers that needed buffer size calculations. LGTM!

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

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

LGTM

@leandron leandron merged commit 92eeef6 into apache:main Jan 5, 2022
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
apache#9338)

This correctly calculates the buffer sizes for a variety of targets
based on the `-mcpu` and `-mattr` flags passed to the `cmsis-nn` code
generator.

Added for Conv2d, Depthwise Conv2d and Average Pool.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
apache#9338)

This correctly calculates the buffer sizes for a variety of targets
based on the `-mcpu` and `-mattr` flags passed to the `cmsis-nn` code
generator.

Added for Conv2d, Depthwise Conv2d and Average Pool.
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