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

armv7 kernel for sparse conv pass #6911

Merged
merged 8 commits into from
Sep 16, 2021
Merged

armv7 kernel for sparse conv pass #6911

merged 8 commits into from
Sep 16, 2021

Conversation

hcms1994
Copy link
Contributor

@hcms1994 hcms1994 commented Sep 10, 2021

这个PR是#6836 中描述的第三个子PR。基于汇编语言,具体实现了armv7架构下的SpMM(Sparse Matrix Multiplication,稀疏矩阵乘法),用以加速1x1卷积运算。该实现具备以下功能点:

  1. 支持fp32-fp32,int8-fp32,int8-int8三种conv1x1 op的稀疏化运算,用以替代GEMM。
  2. 相比较GEMM,SpMM在低、中、高端手机上速度均达到加速效果。同时在mobilenet系列模型上验证加速收益。

@paddle-bot-old
Copy link

Thanks for your contribution!

Copy link
Collaborator

@chenjiaoAngel chenjiaoAngel left a comment

Choose a reason for hiding this comment

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

请添加单测,用于正确性验证。可以放在lite/test/kernel或lite/tests/math 目录下,内容可参考lite/tests/math/sgemm_compute_test.cc 和 lite/tests/math/conv_int8_compute_test.cc

lite/backends/arm/math/sparse_conv_impl.cc Outdated Show resolved Hide resolved
@hcms1994 hcms1994 closed this Sep 13, 2021
@hcms1994 hcms1994 reopened this Sep 13, 2021
Copy link
Collaborator

@chenjiaoAngel chenjiaoAngel left a comment

Choose a reason for hiding this comment

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

LGTM

@chenjiaoAngel chenjiaoAngel merged commit f6b9913 into PaddlePaddle:develop Sep 16, 2021
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.

2 participants