未验证 提交 7392578d 编写于 作者: L Leo Chen 提交者: GitHub

[new-exec] set type of op-kernel op by place (#39458)

上级 8803f6bb
......@@ -263,7 +263,15 @@ void deal_operator_base(const platform::Place& place,
auto* dev_ctx = pool.Get(place);
// input, output is prepared. set the other attributes.
op_func_node->operator_base_ = op_base;
op_func_node->type_ = OpFuncType::kQueueSync; // alway Sync
if (platform::is_gpu_place(place)) {
op_func_node->type_ = OpFuncType::kQueueAsync;
} else if (platform::is_cpu_place(place)) {
op_func_node->type_ = OpFuncType::kQueueSync;
} else {
PADDLE_THROW(
platform::errors::Fatal("Unsupported current place %s", place));
}
op_func_node->kernel_func_ = nullptr;
op_base->Run(*local_scope, place); // Run without data transformer.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册