未验证 提交 dcfe2f1a 编写于 作者: S Sonder 提交者: GitHub

Support control flow for static build [Step 1: support subgraph] (#56185)

* remove execution_config.used_for_control_flow_op

* update

* update

* open static build flag

* close static build flag

* open static build flag

* add searchsorted to analyze dtype list

* recover and add test_searchsorted_op to static build list

* Update CMakeLists.txt

* Update CMakeLists.txt
上级 5d0a1fd0
......@@ -474,6 +474,13 @@ void FakeInitializeOutputsForFunctionKernel(
? DataType::INT64
: in_dtype;
}
} else if (op_type == "searchsorted") {
bool out_int32 = op.Attr<bool>("out_int32");
if (out_int32) {
dtype = DataType::INT32;
} else {
dtype = DataType::INT64;
}
} else {
VLOG(4) << "Get dtype result from InferMeta";
RuntimeInferShapeContext infer_shape_ctx(op, runtime_ctx);
......
......@@ -47,7 +47,6 @@ ProgramInterpreter::ProgramInterpreter(const platform::Place& place,
static_build_ = FLAGS_new_executor_static_build &&
!FLAGS_new_executor_use_cuda_graph &&
!execution_config.used_for_control_flow_op &&
interpreter::BlockCanBeStaticBuilt(block);
exception_notifier_ = main_thread_blocker_.RegisterEvent(kExceptionCaught);
......
......@@ -1273,6 +1273,7 @@ set(STATIC_BUILD_TESTS
test_adamw_op
test_arg_min_max_op
test_assign_pos_op
test_bucketize_api
test_bincount_op
test_c_embedding_op
test_decayed_adagrad_op
......@@ -1303,6 +1304,7 @@ set(STATIC_BUILD_TESTS
test_prune_gate_by_capacity_op
test_random_routing_op
test_reduce_op
test_searchsorted_op
test_segment_ops
test_sparse_momentum_op
test_sgd_op_bf16
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册