CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Move paddle enforce from phi to common #61411
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
Move paddle enforce from phi to common #61411
Conversation
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.
Greate Work!
… move_paddle_enforce_from_phi_to_common
@@ -48,7 +48,8 @@ void GroupOp::Build(pir::Builder& builder, // NOLINT | |||
std::unique_ptr<pir::Block>&& block) { | |||
VLOG(4) << "Start build GroupOp"; | |||
if (block && !block->empty()) { | |||
IR_ENFORCE(block->back().isa<pir::YieldOp>()); | |||
// IR_ENFORCE(block->back().isa<pir::YieldOp>()); |
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.
好的
@@ -66,7 +66,145 @@ class CommonNotMetException : public std::exception { | |||
}; | |||
|
|||
namespace enforce { | |||
namespace details { |
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.
秉持着一个原则就是能放到.cc中实现的,就放在.cc中。具体就不细看了~
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.
嗯嗯
paddle/phi/core/enforce.cc
Outdated
} | ||
return sout.str(); | ||
} | ||
// TEST_API std::string SimplifyErrorTypeFormat(const std::string& str) { |
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.
delete?
@@ -143,7 +144,11 @@ void ConcatOp::Build(pir::Builder& builder, // NOLINT | |||
argument.inputs = inputs; | |||
std::vector<pir::Type> inputs_type(inputs.size()); | |||
|
|||
IR_ENFORCE(inputs.size() > 0); | |||
// IR_ENFORCE(inputs.size() > 0); |
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.
delete unused code
// IR_ENFORCE(attributes.count(kAttrName) > 0 && | ||
// attributes.at(kAttrName) | ||
// .isa<cinn::dialect::CINNKernelInfoAttribute>(), | ||
// "Type of attribute: instruction is not right."); |
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.
同上
… move_paddle_enforce_from_phi_to_common
PR types
Others
PR changes
Others
Description
将paddle/phi目录下的paddle_enforce*系列下沉到common
Pcard-67164