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 @@ -391,17 +391,7 @@ class SliceGradKernel : public framework::OpKernel<T> {
391391 }
392392 }
393393
394- if (need_pad_num == 0 ) {
395- // do not need padding, pass if data address same, else copy
396- if (d_input->mutable_data <T>(context.GetPlace ()) == d_out->data <T>()) {
397- // inplace, do not any operator, pass
398- } else {
399- framework::TensorCopy (
400- *d_out, context.GetPlace (),
401- context.template device_context <platform::DeviceContext>(),
402- d_input);
403- }
404- } else if (need_pad_num == 1 ) {
394+ if (need_pad_num == 1 ) {
405395 // only need padding one dimension, we can reduce dimension.
406396 // only the padding dimension is available for us.
407397 // How to reduce dimension(5 to 3 for example):
You can’t perform that action at this time.
0 commit comments