-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
opt 1x1 conv adreno kernel #5904
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") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetLocalWorkSize 函数中只计算 local_work_size,global_work_size 相关的代码需要移出到 SetGlobalWorkSize 函数中
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
现在的情况是一开始不能确定函数名是啥。函数名确定golobal_work_size_,有了global_work_size_再去确定local_work_size。tuning后确定了函数名其他的也就都确定了。我再想想看看能不能剥离或者更改SetLocalWorkSize名字
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接把对w_blk_
的赋值放在SetGlobalWorkSize
函数中就可以吧。
if (kernel_func_names_[0] == "conv2d_1x1_h1w5c1") {
w_blk_ = UP_DIV(default_w_blk_, 5);
}
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1、添加分块h1w5c1 h1w7c1 h2w2c2三个1x1 kernel。
2、将1x1分块纳入tuning当中。
本pr中的尚未能将kernel名字、global_work_size、local_work_size保存为bin文件,暂不能merge。