提交 95a0d7c7 编写于 作者: Y Yu Yang

Illegal memory access

上级 798e6907
...@@ -138,15 +138,9 @@ struct ComputationOpHandle : public OpHandle { ...@@ -138,15 +138,9 @@ struct ComputationOpHandle : public OpHandle {
protected: protected:
void RunImpl() override { void RunImpl() override {
// Wait other op if necessary
if (platform::is_gpu_place(place_)) {
int dev_id = boost::get<platform::CUDAPlace>(place_).device;
cudaSetDevice(dev_id);
}
auto *cur_ctx = dev_ctx_[place_]; auto *cur_ctx = dev_ctx_[place_];
for (auto *in : inputs_) { for (auto *in : inputs_) {
if (in->generated_op_ && in->generated_op_->dev_ctx_[place_] != cur_ctx) { if (in->generated_op_ && in->generated_op_->dev_ctx_[place_] != cur_ctx) {
VLOG(3) << "Wait " << in->generated_op_->DebugString();
in->generated_op_->Wait(cur_ctx); in->generated_op_->Wait(cur_ctx);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册