From 5c437c43c725d72c261a2fa08229597d00d258e7 Mon Sep 17 00:00:00 2001 From: Superjom Date: Sun, 30 Jul 2017 09:58:22 +0800 Subject: [PATCH] fix paddle/develop build error concerning rnnop --- paddle/operators/recurrent_network_op.cc | 5 +++-- paddle/platform/device_context.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/paddle/operators/recurrent_network_op.cc b/paddle/operators/recurrent_network_op.cc index 0a86d4b9fb..1a101d6ddf 100644 --- a/paddle/operators/recurrent_network_op.cc +++ b/paddle/operators/recurrent_network_op.cc @@ -69,9 +69,10 @@ void ConcatOutputs(std::vector>& step_scopes, Tensor* step_output = step_scopes[j] ->GetVariable(outlinks[i].internal) ->GetMutable(); - // TODO data type and platform::DeviceContext() should set correctly + // TODO(luotao02) data type and platform::DeviceContext() should set + // correctly (output->Slice(j, j + 1)) - .CopyFrom(*step_output, platform::CPUDeviceContext()); + .CopyFrom(*step_output, platform::CPUPlace()); } } } diff --git a/paddle/platform/device_context.cc b/paddle/platform/device_context.cc index b65c20006c..a928e09778 100644 --- a/paddle/platform/device_context.cc +++ b/paddle/platform/device_context.cc @@ -43,7 +43,7 @@ Eigen::GpuDevice* DeviceContext::get_eigen_device() const { CUDADeviceContext::CUDADeviceContext(GPUPlace place) : place_(place) { SetDeviceId(place_.device); - // TODO (qijun) Pass a created cuda stream to Eigen::CudaStreamDevice directly + // TODO(qijun) Pass a created cuda stream to Eigen::CudaStreamDevice directly // here will cause segment fault. We must implement a class derived from // Eigen::StreamInterface, and reinitialize it with a cuda stream and a gpu id // later. Please refer to the implementation of class EigenCudaStreamDevice -- GitLab