Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from
Aug 17, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion paddle/fluid/framework/new_executor/program_interpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions test/legacy_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,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
Expand Down Expand Up @@ -1302,6 +1303,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
Expand Down