-
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
[OpenCL]add greater_than cast pass and add greater_than opencl kernel and add abs opencl kernel #6595
Conversation
Thanks for your contribution! |
@@ -0,0 +1,34 @@ | |||
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. |
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.
2021
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.
已改
(CL_DTYPE)(input_y), | ||
(CL_DTYPE)(input_y)); | ||
CL_DTYPE4 in_x = READ_IMG_TYPE(CL_DTYPE_CHAR, input_x, SAMPLER, (int2)(x, y)); | ||
int4 out_tmp = isgreater(in_x, in_y); |
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.
opencl标准(如下),如果严格检测,是否会有编译报错?保险期间,可以加个宏?
int4 isgreater (float4 x, float4 y)
short4 isgreater (half4 x, half4 y)
#ifdef CL_DTYPE_half
short4 out_tmp = isgreater(in_x, in_y);
#else
int4 out_tmp = isgreater(in_x, in_y);
#endif
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.
已改
@@ -0,0 +1,32 @@ | |||
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. |
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.
2021
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.
已改
|
||
void GreaterThanCastFuser::BuildPattern() { | ||
// create nodes | ||
// fc |
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.
// fc
注释删除
->assert_is_op_input("cast", "X") | ||
->AsIntermediate(); | ||
|
||
// prelu |
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.
注释删除,其他注释也检查下吧
@@ -0,0 +1,38 @@ | |||
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. |
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.
2021
#ifdef LITE_WITH_PROFILE | ||
void SetProfileRuntimeKernelInfo(paddle::lite::profile::OpCharacter* ch) { | ||
ch->kernel_func_name = kernel_func_name_; | ||
ch->cl_event = |
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.
加上global_work_size吧,参考conv中的SetProfileRuntimeKernelInfo
函数
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.
已修改
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.
several comments
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
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
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
No description provided.