File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -468,17 +468,7 @@ class SliceGradKernel : public framework::OpKernel<T> {
468
468
}
469
469
}
470
470
471
- if (need_pad_num == 0 ) {
472
- // do not need padding, pass if data address same, else copy
473
- if (d_input->mutable_data <T>(context.GetPlace ()) == d_out->data <T>()) {
474
- // inplace, do not any operator, pass
475
- } else {
476
- framework::TensorCopy (
477
- *d_out, context.GetPlace (),
478
- context.template device_context <platform::DeviceContext>(),
479
- d_input);
480
- }
481
- } else if (need_pad_num == 1 ) {
471
+ if (need_pad_num == 1 ) {
482
472
// only need padding one dimension, we can reduce dimension.
483
473
// only the padding dimension is available for us.
484
474
// How to reduce dimension(5 to 3 for example):
You can’t perform that action at this time.
0 commit comments