未验证 提交 58916e31 编写于 作者: R Ruibiao Chen 提交者: GitHub

Skip fake alloc in static build for some communication OPs (#53593)

* Skip fake alloc in static build for depend and nop op

* Skip communication op

* Skip sync op
上级 b73594b4
......@@ -445,7 +445,7 @@ void BuildOpFuncList(const platform::Place& place,
// Step 1: create all ops for current block.
CreateAllOps(block, &ops_unique);
VLOG(4) << "Static build: " << static_build;
VLOG(1) << "Static build: " << static_build;
if (!execution_config.used_for_jit) {
// If gc is enabled and block size > 1
......
......@@ -25,7 +25,20 @@ std::set<std::string> OperatorBasesMustRunInStaticBuild = {
"create_double_buffer_reader", "create_py_reader"};
std::set<std::string> OpsCanSkipedFakeAllocInStaticBuild = {
"create_double_buffer_reader", "create_py_reader", "fetch_v2"};
"c_comm_init",
"c_comm_init_all",
"c_comm_init_multitrainer",
"c_gen_bkcl_id",
"c_gen_nccl_id",
"c_sync_calc_stream",
"c_sync_comm_stream",
"c_wait_comm",
"c_wait_compute",
"create_double_buffer_reader",
"create_py_reader",
"depend",
"fetch_v2",
"nop"};
// Cannot static analysis these Ops' output dtype or backend because their
// kernels have not moved to PHI yet.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册