CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[PIR] Refactor pir GetValueName - part 2 #66559
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] Refactor pir GetValueName - part 2 #66559
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -2,3 +2,8 @@ cc_library( | |||
pir_general_functions | |||
SRCS general_functions.cc analysis_info.cc | |||
DEPS op_dialect op_dialect_vjp pir) | |||
|
|||
cc_library( | |||
pir_analysis_name |
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.
这个不能放在 pir_general_functions
里么?
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.
可以,但是 pybind 不需要依赖pir_general_functions
里的方法,就拆开了
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.
name_analysis
…ration_getname_2 # Conflicts: # paddle/fluid/pybind/pir.cc
@@ -54,6 +53,7 @@ | |||
#include "paddle/fluid/pir/transforms/gpu/fused_bn_add_act_pass.h" | |||
#include "paddle/fluid/pir/transforms/passes.h" | |||
#include "paddle/fluid/pir/utils/general_functions.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.
可以,但是 pybind 不需要依赖
pir_general_functions
里的方法,就拆开了
这不是依赖了么
paddle/fluid/pybind/pir.cc
Outdated
@@ -548,7 +309,7 @@ void PruneWithInput(const std::vector<pir::Value> &input_vars, | |||
auto input = input_vars[idx]; | |||
auto origin_op = input.defining_op(); | |||
std::string name = "input_" + std::to_string(idx); | |||
if (auto names = name_analysis::TryGetValueFirstName(input)) { | |||
if (auto names = pir::utils::name_analysis::TryGetValueFirstName(input)) { |
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.
要不 using pir::utils::name_analysis
一下?
@@ -103,54 +104,16 @@ static auto GetNameFromValue(const ::pir::Block *block, | |||
true, | |||
phi::errors::InvalidArgument( | |||
"GetNameFromValue should allow input or output at least one.")); |
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.
参数 allow_input
和 allow_output
可以删掉了,block
也可以删掉了
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.
--------- Co-authored-by: SigureMo <sigure.qaq@gmail.com>
PR Category
Performance Optimization
PR Types
Not User Facing
Description
相关链接: