-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 3: support while] #57616
Support control flow for static build [Step 3: support while] #57616
Conversation
… control_flow_support-step-2
…he last op in the block
… control_flow_support-step-2
… control_flow_support-step-2
… control_flow_support-step-2
… control_flow_support-step-3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR根据comments修改后将FLAGS关闭
@@ -20,13 +20,20 @@ | |||
#include "paddle/fluid/framework/reader.h" | |||
#include "paddle/fluid/operators/reader/buffered_reader.h" | |||
|
|||
#include "paddle/fluid/operators/controlflow/control_flow_op_helper.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
项目内头文件引用应按字典序排列,有宏定义包裹的头文件引用置于无宏定义包裹的头文件之后。
@@ -474,7 +668,14 @@ void FakeInitializeOutputsForOperatorBase( | |||
const std::vector<VarMetaInfo> out_var_info_before_build = | |||
GetVarsInfo(scope, op.Outputs(), op); | |||
|
|||
RunPreStaticBuild(*scope, place, op); | |||
VLOG(3) << "debug1: " << op.DebugStringEx(scope); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要写debug1
、debug2
这种没有具体含义的log信息
all done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…Paddle#57616) * add conditional_block to OperatorBasesHandledInStaticBuild * run op in FakeInitializeOutputsForOperatorBase * add init_success judge * fix build error * fix * add SetSubBlockCore func * add PreStaticRun func * add PreStaticRun to interpreter_base and new_ir_inter * recover codes * add PreStaticBuild and BlockCanBeStaticBuilt * fix logic about RunPreStaticBuild * change CreateOpFromOpDesc type * fix build error * fix build error * remove IsOperatorBasesHandledInStaticBuild * recover BlockCanBeStaticBuilt * add logic about conditional_block run static build * recover codes * recover BlockCanBeStaticBuilt * support static build condational block op when condational block is the last op in the block * fix error * fix logic about last op * fit for sub block can't open static build * add IsStaticBuild * fix build error * fit logic when sub block can't open static build * close static build when sub_block don't support static_build * recover third party * add is_skil_fake_init logic * set the backend of the lamb * change start index * add if conditional for cal is_skip_fake_init * change name * close static_build for test_conditional_block * add static buiild support for conditional block in case of the output's dtype/place is changed but the following op is not use this output * fix logic error * fix timeout error * fix * remove useless codes * fix * fix * fix build error * move GetVarsInfo and RunPreStaticBuild from opeartor to static_build * fix lamb backend registe * fix build error * fix build error * remove lamp op test from new_ir_op_test_white_list * fix * move generating following_input_vars logic to static_build.cc * remove HasInfo * fix build error * recover codes and turn off the flag * add support for while * fix
…Paddle#57616) * add conditional_block to OperatorBasesHandledInStaticBuild * run op in FakeInitializeOutputsForOperatorBase * add init_success judge * fix build error * fix * add SetSubBlockCore func * add PreStaticRun func * add PreStaticRun to interpreter_base and new_ir_inter * recover codes * add PreStaticBuild and BlockCanBeStaticBuilt * fix logic about RunPreStaticBuild * change CreateOpFromOpDesc type * fix build error * fix build error * remove IsOperatorBasesHandledInStaticBuild * recover BlockCanBeStaticBuilt * add logic about conditional_block run static build * recover codes * recover BlockCanBeStaticBuilt * support static build condational block op when condational block is the last op in the block * fix error * fix logic about last op * fit for sub block can't open static build * add IsStaticBuild * fix build error * fit logic when sub block can't open static build * close static build when sub_block don't support static_build * recover third party * add is_skil_fake_init logic * set the backend of the lamb * change start index * add if conditional for cal is_skip_fake_init * change name * close static_build for test_conditional_block * add static buiild support for conditional block in case of the output's dtype/place is changed but the following op is not use this output * fix logic error * fix timeout error * fix * remove useless codes * fix * fix * fix build error * move GetVarsInfo and RunPreStaticBuild from opeartor to static_build * fix lamb backend registe * fix build error * fix build error * remove lamp op test from new_ir_op_test_white_list * fix * move generating following_input_vars logic to static_build.cc * remove HasInfo * fix build error * recover codes and turn off the flag * add support for while * fix
…Paddle#57616) * add conditional_block to OperatorBasesHandledInStaticBuild * run op in FakeInitializeOutputsForOperatorBase * add init_success judge * fix build error * fix * add SetSubBlockCore func * add PreStaticRun func * add PreStaticRun to interpreter_base and new_ir_inter * recover codes * add PreStaticBuild and BlockCanBeStaticBuilt * fix logic about RunPreStaticBuild * change CreateOpFromOpDesc type * fix build error * fix build error * remove IsOperatorBasesHandledInStaticBuild * recover BlockCanBeStaticBuilt * add logic about conditional_block run static build * recover codes * recover BlockCanBeStaticBuilt * support static build condational block op when condational block is the last op in the block * fix error * fix logic about last op * fit for sub block can't open static build * add IsStaticBuild * fix build error * fit logic when sub block can't open static build * close static build when sub_block don't support static_build * recover third party * add is_skil_fake_init logic * set the backend of the lamb * change start index * add if conditional for cal is_skip_fake_init * change name * close static_build for test_conditional_block * add static buiild support for conditional block in case of the output's dtype/place is changed but the following op is not use this output * fix logic error * fix timeout error * fix * remove useless codes * fix * fix * fix build error * move GetVarsInfo and RunPreStaticBuild from opeartor to static_build * fix lamb backend registe * fix build error * fix build error * remove lamp op test from new_ir_op_test_white_list * fix * move generating following_input_vars logic to static_build.cc * remove HasInfo * fix build error * recover codes and turn off the flag * add support for while * fix
PR types
Performance optimization
PR changes
Others
Description
当下在开启静态选Kernel的时候 while 算子是直接采用跑算子的方法,本 PR 的核心目的是将 while 加入到 OperatorBasesHandledInStaticBuild 中并使其支持 static_build
相关Issue: