CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[NewIR]New ir support print op #55648
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
[NewIR]New ir support print op #55648
Conversation
… new_ir_support_print_op
… new_ir_support_print_op
… new_ir_support_print_op
… new_ir_support_print_op
… new_ir_support_print_op
… new_ir_support_print_op
namespace paddle { | ||
namespace operators { |
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.
命名空间需要修改成phi::funcs
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.
done
// std::type_index dtype = framework::ToTypeIndex( | ||
// framework::TransToProtoVarType(print_tensor.dtype())); |
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.
建议删除冗余注释
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.
done
paddle/fluid/ir/dialect/pd_op.yaml
Outdated
- {typename: 'bool', name: print_tensor_layout} | ||
- {typename: 'bool', name: print_tensor_lod} | ||
- {typename: 'str', name: print_phase} | ||
- {typename: 'bool', name: is_forward} |
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.
这里删除了默认值,也需要找相关同学review确认下?
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.
done
|
||
// if( (*it)->name() == "phi.kernel") | ||
// { | ||
// kernel_key.set_backend ( phi::Backend::CPU ); |
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.
冗余代码?
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.
done
|
||
const char kForward[] = "FORWARD"; | ||
const char kBackward[] = "BACKWARD"; | ||
const char kBoth[] = "BOTH"; |
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.
这些好像没有被用到?
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.
done
@@ -32,4 +33,40 @@ void ShaddowFeedKernel(const Context& ctx, | |||
} | |||
} | |||
|
|||
template <typename T, typename Context> | |||
void PrintKernel(const Context& ctx, |
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.
PrintKernel 为什么放到了feed_with_place_impl.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.
这些算子都是属于一些衔接模块或调试模块,就计划放在一个文件中,feed with place impl 这个文件名我后续统一升级下,太多的文件,其实编译造成不小负担的;这些kernel 基本不会被其他的算子调用的
… new_ir_support_print_op
… new_ir_support_print_op
… new_ir_support_print_op
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
PR types
Bug fixes
PR changes
Others
Description
由于print op没有迁到phi下面(机制上也不支持print 迁移),因此做了print功能的部分迁移(print里面的first_n设置暂不支持),方便在动转静场景下做调试
Others
Pcard-67164