fix priority

detection_output_fixbug
qiaolongfei 7 years ago
parent ca90356b0e
commit 0b52cc886f

@ -488,6 +488,8 @@ void OperatorWithKernel::Run(const Scope& scope,
}
}
VLOG(3) << "expected_kernel_key:" << expected_kernel_key;
Scope& new_scope = scope.NewScope();
for (auto& var_name_item : this->Inputs()) {
@ -520,7 +522,8 @@ void OperatorWithKernel::Run(const Scope& scope,
auto kernel_iter = kernels.find(expected_kernel_key);
kernel_iter->second->Compute(ExecutionContext(*this, new_scope, *dev_ctx));
kernel_iter->second->Compute(ExecutionContext(
*this, new_scope, *pool.Get(expected_kernel_key.place_)));
}
proto::DataType OperatorWithKernel::IndicateDataType(

@ -53,7 +53,7 @@ class FetchOp : public framework::OperatorBase {
// FIXME(yuyang18): Should we assume the fetch operator always generate
// CPU outputs?
platform::DeviceContextPool &pool = platform::DeviceContextPool::Instance();
auto &dev_ctx = *pool.Get(place);
auto &dev_ctx = *pool.Get(src_item.place());
CopyFrom(src_item, platform::CPUPlace(), dev_ctx, &dst_item);
dev_ctx.Wait();

Loading…
Cancel
Save