From 802b33489aa3c71d9764f65a4a1ddfefb68a40cb Mon Sep 17 00:00:00 2001 From: phlrain Date: Mon, 18 Mar 2019 09:33:25 +0000 Subject: [PATCH] remove resize then seq num == 1; test=develop --- paddle/fluid/operators/math/sequence_padding.cu | 6 ------ 1 file changed, 6 deletions(-) diff --git a/paddle/fluid/operators/math/sequence_padding.cu b/paddle/fluid/operators/math/sequence_padding.cu index 035e10dcbe..68c7093370 100644 --- a/paddle/fluid/operators/math/sequence_padding.cu +++ b/paddle/fluid/operators/math/sequence_padding.cu @@ -78,12 +78,6 @@ class PaddingLoDTensorFunctor { "The numel of 'pad_value' can only be 1 or be equal to the " "'step_width'."); - if (!norm_by_times && seq_num == 1UL && pad_seq_len == max_seq_len) { - TensorCopy(seq_tensor, context.GetPlace(), context, pad_tensor); - pad_tensor->Resize(pad_tensor_dims); - return; - } - const int kBlockSize = 512; /* At least use 32 threads to copy sequence_width elements, -- GitLab