From 80bd1ca01f62871b7e14fbdbe70482b3eeff9779 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Wed, 11 Apr 2018 01:31:59 -0700 Subject: [PATCH] "fix the style" --- paddle/fluid/operators/sequence_expand_op.cu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/sequence_expand_op.cu b/paddle/fluid/operators/sequence_expand_op.cu index 8119afce1a4..111ccba2255 100644 --- a/paddle/fluid/operators/sequence_expand_op.cu +++ b/paddle/fluid/operators/sequence_expand_op.cu @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#define EIGEN_USE_GPU #include #include "paddle/fluid/operators/sequence_expand_op.h" #include "paddle/fluid/platform/cuda_helper.h" @@ -78,7 +77,7 @@ __global__ void sequence_expand_grad_kernel( void GetOutputOffset(const framework::Vector& x_lod, const framework::Vector& ref_lod, - framework::Vector& out_offset) { + framework::Vector* out_offset) { size_t offset = 0; int lod_size = static_cast(x_lod.size()); for (int i = 0; i < static_cast(x_lod.size()); ++i) { @@ -98,7 +97,7 @@ struct SequenceExpandFunctor { LoDTensor* out) { int x_item_length = x.numel() / x.dims()[0]; framework::Vector out_offset(x_lod.size()); - GetOutputOffset(x_lod, ref_lod, out_offset); + GetOutputOffset(x_lod, ref_lod, &out_offset); int thread_x = std::min(32, std::max(static_cast(ref_lod.size()), 16)); int thread_y = 16; @@ -124,7 +123,7 @@ struct SequenceExpandGradFunctor { LoDTensor* dx) { int x_item_length = framework::product(dx->dims()) / dx->dims()[0]; framework::Vector out_offset(x_lod.size()); - GetOutputOffset(x_lod, ref_lod, out_offset); + GetOutputOffset(x_lod, ref_lod, &out_offset); int thread_x = std::min(32, std::max(static_cast(ref_lod.size()), 16)); int thread_y = 16; -- GitLab