Skip to content

Commit 8fd20b5

Browse files
authored
[Phi] Move grid sample op kernel into phi (#40585)
* add grid sample phi kernel * add grid sample phi kernel and remove original kernel * replace mutable_data by alloc
1 parent ad81f22 commit 8fd20b5

File tree

12 files changed

+1398
-1102
lines changed

12 files changed

+1398
-1102
lines changed

paddle/fluid/operators/grid_sampler_op.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "paddle/fluid/operators/grid_sampler_op.h"
1615
#include <memory>
1716
#include <string>
17+
1818
#include "paddle/fluid/framework/op_registry.h"
1919
#include "paddle/fluid/framework/op_version_registry.h"
2020
#include "paddle/fluid/platform/device/gpu/gpu_dnn.h"
@@ -229,15 +229,6 @@ REGISTER_OPERATOR(grid_sampler, ops::GridSampleOp, ops::GridSampleOpMaker,
229229
ops::GridSampleGradMaker<paddle::imperative::OpBase>);
230230
REGISTER_OPERATOR(grid_sampler_grad, ops::GridSampleOpGrad);
231231

232-
REGISTER_OP_CPU_KERNEL(
233-
grid_sampler,
234-
ops::GridSampleOpKernel<paddle::platform::CPUDeviceContext, float>,
235-
ops::GridSampleOpKernel<paddle::platform::CPUDeviceContext, double>);
236-
REGISTER_OP_CPU_KERNEL(
237-
grid_sampler_grad,
238-
ops::GridSampleGradOpKernel<paddle::platform::CPUDeviceContext, float>,
239-
ops::GridSampleGradOpKernel<paddle::platform::CPUDeviceContext, double>);
240-
241232
REGISTER_OP_VERSION(grid_sampler)
242233
.AddCheckpoint(
243234
R"ROC(

0 commit comments

Comments
 (0)