Skip to content

Commit 9f0a939

Browse files
authored
Merge pull request #13742 from PaddlePaddle/revert-13675-v1.0.0_deeeplabv3
Revert "Optimization of Kernels that related to DeepLabv3+ (#13534)"
2 parents e5778b8 + effdae1 commit 9f0a939

File tree

9 files changed

+188
-817
lines changed

9 files changed

+188
-817
lines changed

paddle/fluid/operators/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ op_library(fusion_lstm_op DEPS cpu_lstm_compute)
301301
if (WITH_GPU)
302302
op_library(conv_op DEPS vol2col depthwise_conv im2col)
303303
op_library(layer_norm_op DEPS cub)
304-
op_library(reduce_mean_op DEPS cub)
305304
else()
306305
op_library(conv_op DEPS vol2col im2col)
307306
endif()

paddle/fluid/operators/conv_op.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ class DepthwiseConvKernel : public framework::OpKernel<T> {
380380
math::DepthwiseConvFunctor<DeviceContext, T> depthwiseConv;
381381

382382
auto& dev_ctx = context.template device_context<DeviceContext>();
383-
depthwiseConv(dev_ctx, *input, filter, strides, paddings, dilations,
384-
output);
383+
depthwiseConv(dev_ctx, *input, filter, strides, paddings, output);
385384
}
386385
};
387386

@@ -416,14 +415,14 @@ class DepthwiseConvGradKernel : public framework::OpKernel<T> {
416415
input_grad->mutable_data<T>(context.GetPlace());
417416
set_zero(dev_ctx, input_grad, static_cast<T>(0));
418417
depthwiseConvInputGrad(dev_ctx, *input, filter, *output_grad, strides,
419-
paddings, dilations, input_grad);
418+
paddings, input_grad);
420419
}
421420

422421
if (filter_grad) {
423422
filter_grad->mutable_data<T>(context.GetPlace());
424423
set_zero(dev_ctx, filter_grad, static_cast<T>(0));
425424
depthwiseConvFilterGrad(dev_ctx, *input, *output_grad, strides, paddings,
426-
dilations, filter_grad);
425+
filter_grad);
427426
}
428427
}
429428
};

paddle/fluid/operators/conv_transpose_op.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ class DepthwiseConvTransposeKernel : public framework::OpKernel<T> {
345345
math::DepthwiseConvInputGradFunctor<DeviceContext, T>
346346
depthwiseConvInputGrad;
347347
depthwiseConvInputGrad(dev_ctx, *output, filter, *input, strides, paddings,
348-
dilations, output);
348+
output);
349349
}
350350
};
351351

@@ -367,11 +367,10 @@ class DepthwiseConvTransposeGradKernel : public framework::OpKernel<T> {
367367
auto& dev_ctx = context.template device_context<DeviceContext>();
368368
std::vector<int> strides = context.Attr<std::vector<int>>("strides");
369369
std::vector<int> paddings = context.Attr<std::vector<int>>("paddings");
370-
std::vector<int> dilations = context.Attr<std::vector<int>>("dilations");
371370

372371
if (input_grad) {
373372
math::DepthwiseConvFunctor<DeviceContext, T> depthwiseConv;
374-
depthwiseConv(dev_ctx, *output_grad, filter, strides, paddings, dilations,
373+
depthwiseConv(dev_ctx, *output_grad, filter, strides, paddings,
375374
input_grad);
376375
}
377376

@@ -383,7 +382,7 @@ class DepthwiseConvTransposeGradKernel : public framework::OpKernel<T> {
383382
math::DepthwiseConvFilterGradFunctor<DeviceContext, T>
384383
depthwiseConvFilterGrad;
385384
depthwiseConvFilterGrad(dev_ctx, *output_grad, *input, strides, paddings,
386-
dilations, filter_grad);
385+
filter_grad);
387386
}
388387
}
389388
};

paddle/fluid/operators/cub_reduce.h

Lines changed: 0 additions & 322 deletions
This file was deleted.

0 commit comments

Comments
 (0)