opt 1x1 conv adreno kernel #5904
Merged
daming5432 merged 3 commits intoPaddlePaddle:developfrom Apr 21, 2021
Merged
Conversation
|
Thanks for your contribution! |
| kernel_key.str(""); | ||
| kernel_key << kernel_func_names_[0] << build_options_[0] << time_stamp_; | ||
| kernel_ = context.cl_context()->GetKernel(kernel_key.str()); | ||
| if (kernel_func_names_[0] == "conv2d_1x1_h1w5c1") { |
Collaborator
There was a problem hiding this comment.
SetLocalWorkSize 函数中只计算 local_work_size,global_work_size 相关的代码需要移出到 SetGlobalWorkSize 函数中
Collaborator
Author
There was a problem hiding this comment.
现在的情况是一开始不能确定函数名是啥。函数名确定golobal_work_size_,有了global_work_size_再去确定local_work_size。tuning后确定了函数名其他的也就都确定了。我再想想看看能不能剥离或者更改SetLocalWorkSize名字
Collaborator
There was a problem hiding this comment.
直接把对w_blk_的赋值放在SetGlobalWorkSize函数中就可以吧。
if (kernel_func_names_[0] == "conv2d_1x1_h1w5c1") {
w_blk_ = UP_DIV(default_w_blk_, 5);
}
...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1、添加分块h1w5c1 h1w7c1 h2w2c2三个1x1 kernel。

2、将1x1分块纳入tuning当中。
本pr中的尚未能将kernel名字、global_work_size、local_work_size保存为bin文件,暂不能merge。