-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Unify Map in OpDescBind #4547
Unify Map in OpDescBind #4547
Conversation
@@ -134,7 +158,8 @@ void OpDescBind::Sync() { | |||
attr_desc->set_name(attr.first); | |||
attr_desc->set_type( | |||
static_cast<framework::AttrType>(attr.second.which() - 1)); | |||
boost::apply_visitor(SetAttrDescVisitor(attr_desc), attr.second); | |||
SetAttrDescVisitor visitor(attr_desc); |
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.
This change is recommended by clang-tidy
for code reading.
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
|
||
namespace paddle { | ||
namespace framework { | ||
|
||
// The order should be as same as framework.proto | ||
typedef boost::variant<boost::blank, int, float, std::string, std::vector<int>, |
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.
What is the reason of moving type Attribute
from attribute.h
into a new header files type_defs.h
? This PR claims to resolve a cyclic dependency issue, but there is no description of this issue.
No description provided.