-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
【pir】modify test_while_op.py #60753
【pir】modify test_while_op.py #60753
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
"AllocatedDenseTensorArrayType in vectortype now, but get: %s", | ||
inlet_element_value.type())); | ||
} | ||
ParsePlace(inlet_element_value.type(), type_); |
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.
这段逻辑和原逻辑有一些 diff,原逻辑是 type_ 更新后,跳出循环,目前这段逻辑是不会的?
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.
把for 循环也放入parseplace中可以实现吧
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.
也可以让 ParsePlace 返回一个bool,在PR前break的地方,都直接返回true,然后:
if(ParsePlace(xxxx)){ break; }
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.
可以实现
@@ -20,6 +20,37 @@ | |||
|
|||
namespace paddle { | |||
namespace framework { | |||
void ParsePlace(pir::Type type, OpFuncType type_) { |
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.
void ParsePlace(pir::Type type, OpFuncType type_) { | |
void ParsePlace(pir::Type type, OpFuncType& type_) { |
这里的type_是值copy,调用此函数后,类对象里的type_成员并不会改变
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.
另外建议命名方式也修改下,比如 OpFuncType& op_func_type
paddle/fluid/framework/new_executor/pir_adaptor/pir_adaptor_util.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/framework/new_executor/instruction/control_flow/tuple_push_instruction.cc
Show resolved
Hide resolved
AddEagerGCVar(gc_front_var); | ||
if (!gc_front_var->IsType<VariableRefArray>()) { | ||
AddEagerGCVar(gc_front_var); | ||
} |
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.
建议直接修改 GC 中的实现逻辑,适配 VariableRefArray 的GC,修改位置:
InterpreterCoreEventGarbageCollector::Add
InterpreterCoreFastGarbageCollector::Add
InterpreterCoreNoEventGarbageCollector::Add
3e5bea1
to
093ef67
Compare
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
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, Map 相关的const_cast辛苦单独PR优化下
PR types
others
PR changes
others
Description
pcard-67164
修复test_while_op.py反向单测中遇到的执行器问题;
完善tuple_push, tuple_pop 对vector_type的处理;gc 释放