-
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
【2.0 API】Enhance affine grid operator #26385
Conversation
1. Add cuda kernel 2. Add align corners options test=develop
Thanks for your contribution! |
问题一、能否将对3D的支持推迟一下?
问题二、还需要为paddle.nn.functional.affine_grid写单测么?
|
|
test=develop
453688a
to
d91f592
Compare
namespace ops = paddle::operators; | ||
REGISTER_OP_CUDA_KERNEL( | ||
affine_grid, | ||
ops::AffineGridOpKernel<paddle::platform::CUDADeviceContext, float>, |
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.
so the cuda version mostly reused the eigen implementation? some preliminary benchmark would be nice if time permits.
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.
Added CUDA kernel.
I will give some performance benchmark on CUDNN version and CUDA kernel version in the future.
Currently, it will use CUDNN kernel when align_corners is true and use CUDA kernel when align_corners is false.
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.
need subsequent PR to add support for higher dimensions, otherwise 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
de31410
test=develop
4a1141b
to
dd46209
Compare
… grid_api test=develop
60b1c28
to
1057b18
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
PR types
Others
PR changes
OPs
Describe