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

[BugFix][KERNEL][OPENCL] Fix conv3x3 group. test=develop #4236

Merged
merged 3 commits into from
Sep 2, 2020

Conversation

ysh329
Copy link
Contributor

@ysh329 ysh329 commented Sep 1, 2020

状态:等待review

主要内容

  1. 修复conv3x3 group在oppo骁龙625上结果写入失败(总是0),某三星手机重启问题;
  2. conv3x3 group小地方优化。if-else换为三元操作符等,整个图像修复模型,有略微性能提升60000->55000(625),8000->7000(865),大概10%左右;
  3. 冗余代码移除,group=1。

简单分析

cl kernel里有一个half4 input[9]; 这么个变量,在大部分手机上都没问题,就那两个手机(oppo骁龙625和三星某手机)分别出现结果写入到这个input[9]的某个分量里如input[3].x写入失败(oppo骁龙625),和重启(三星)。

@zhaoyang-star 的建议,尝试把这个half4 input[9],改为half4 input0,input1....定义9个,就不会出现这个上面的问题了。我猜想是不是这种half4 input[9]定义的方式超出了手机gpu的设置,导致的写入失败。当然,感觉这个问题的内存本质,我感觉还可以再深入探究下。

@ysh329 ysh329 requested a review from xiebaiyuan September 1, 2020 11:38
xiebaiyuan
xiebaiyuan previously approved these changes Sep 1, 2020
Copy link
Collaborator

@xiebaiyuan xiebaiyuan left a comment

Choose a reason for hiding this comment

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

LGTM

@zhaoyang-star
Copy link
Collaborator

LGTM

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

@ysh329 ysh329 merged commit 1c20510 into PaddlePaddle:develop Sep 2, 2020
@ysh329 ysh329 deleted the fix-conv3x3-group branch September 2, 2020 08:15
ysh329 added a commit to ysh329/Paddle-Lite-1 that referenced this pull request Sep 2, 2020
…e#4236)

* fix conv3x3 group. test=develop
* remove useless. test=develop
* optimize 3x3 group
ysh329 added a commit that referenced this pull request Sep 2, 2020
* [BugFix][KERNEL][OPENCL] Fix conv3x3 group. test=develop (#4236)

* cherry-pick Fix conv3x3 group

* cherry-pick 394c283(fix concat etc.). test=develop

* cherry-pick transpose, transpose2(732bb91). test=develop

Co-authored-by: dustybluebird <[email protected]>
juncaipeng pushed a commit to juncaipeng/Paddle-Lite that referenced this pull request Oct 27, 2020
…e#4236)

* fix conv3x3 group. test=develop
* remove useless. test=develop
* optimize 3x3 group
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.

4 participants