提交 7fd0d24e 编写于 作者: Y Yu Yang

Add lgo

上级 bade5798
...@@ -149,9 +149,15 @@ struct ScaleLossGradOpHandle : public OpHandle { ...@@ -149,9 +149,15 @@ struct ScaleLossGradOpHandle : public OpHandle {
auto stream = auto stream =
static_cast<platform::CUDADeviceContext *>(this->dev_ctx_[place_]) static_cast<platform::CUDADeviceContext *>(this->dev_ctx_[place_])
->stream(); ->stream();
VLOG(3) << "1";
PADDLE_ENFORCE(cudaGetLastError());
VLOG(3) << "2";
memory::Copy(boost::get<platform::CUDAPlace>(place_), tmp, memory::Copy(boost::get<platform::CUDAPlace>(place_), tmp,
platform::CPUPlace(), &coeff_, sizeof(float), stream); platform::CPUPlace(), &coeff_, sizeof(float), stream);
PADDLE_ENFORCE(cudaGetLastError());
VLOG(3) << "3";
PADDLE_ENFORCE(cudaEventRecord(ev_, stream)); PADDLE_ENFORCE(cudaEventRecord(ev_, stream));
VLOG(3) << "4";
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册