Skip to content
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】Add CUDA kernel and enhance options for grid_sample #26576

Merged
merged 8 commits into from
Aug 24, 2020

Conversation

wanghaoshuang
Copy link
Contributor

@wanghaoshuang wanghaoshuang commented Aug 23, 2020

PR types

New features

PR changes

OPS

Describe

This PR enhance CPU kernel and add new CUDA kernel to make grid_sample support:

  1. align_corners: with bool type.
  2. padding mode: which can be in ['zeros', 'reflect', 'border']
  3. Interpolation mode: which ca be in ['bilinear', 'nearest']

The old CPU and CUDNN version only support align_corners=true, padding_mode='zeros' and interpolation_mode='bilinear'.

The behavior of the new version op in default mode is compatible with the old version.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

test=develop
heavengate
heavengate previously approved these changes Aug 23, 2020
paddle/fluid/operators/grid_sampler_op.cu Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
paddle/fluid/operators/grid_sampler_op.h Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
paddle/fluid/operators/grid_sampler_op.cc Show resolved Hide resolved
@raindrops2sea
Copy link
Collaborator

PR types

New features

PR changes

OPS

Describe

Add CUDA kernel and enhance options for grid_sample

a more detailed description is needed.

Copy link
Contributor

@lanxianghit lanxianghit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghaoshuang wanghaoshuang merged commit 79539cf into PaddlePaddle:develop Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants