-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Modified RandomKernel with Kernel Primitive API #39666
Modified RandomKernel with Kernel Primitive API #39666
Conversation
Thanks for your contribution! |
b9b5728
to
20806bf
Compare
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 for op benchmark
PR描述需要说明下问题的背景,PR的改动点比如你这个PR里新增、删除、修改了什么 |
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.
@@ -714,5 +714,14 @@ __device__ __forceinline__ void ReadDataBc( | |||
} | |||
} | |||
|
|||
template <typename T, int NX, int NY, int BlockSize> |
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.
会的,后面会统一加注释和说明文档
@@ -21,7 +21,7 @@ | |||
import paddle.fluid.core as core | |||
from paddle.fluid.op import Operator | |||
from paddle.fluid.executor import Executor | |||
from op_test import OpTest | |||
from paddle.fluid.tests.unittests.op_test import OpTest |
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.
这个不该另外一个文件引用的时候会挂掉(不同目录下的)
int grid = config.block_per_grid.x; | ||
int block = config.thread_per_block.x; | ||
auto stream = dev_ctx.stream(); | ||
#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.
XPU的线程配置是否合并到GetGpuLaunchConfig1D里面更好?这里线程配置就不用写分支了。包括stream的获取。可以考虑优化下
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.
可以的, 后面会加进去
PR types
Others
PR changes
OPs
Describe
Modifide RandomKernel with Kernel Primitive API
背景:为提升KP 算子覆盖率,为XPU 40+ 模型提供算子支持,此处将gaussian/uniform_random中的Kernel实现替换为KP Kernel实现。
PR改动:
正确性说明: uniform_random_inplace_op/ uniform_random_op/ gaussian_random 的单测均已在develop分支中,py3可以测试到。
3.test_uniform_random_op