|
|
@ -275,8 +275,9 @@ Attribute OpDesc::GetAttr(const std::string &name) const {
|
|
|
|
return it->second;
|
|
|
|
return it->second;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const proto::OpProto::Attr &OpDesc::GetProtoAttr(const std::string &name) {
|
|
|
|
const proto::OpProto::Attr &OpDesc::GetProtoAttr(
|
|
|
|
proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto();
|
|
|
|
const std::string &name) const {
|
|
|
|
|
|
|
|
const proto::OpProto &proto = OpInfoMap::Instance().Get(Type()).Proto();
|
|
|
|
for (int i = 0; i != proto.attrs_size(); ++i) {
|
|
|
|
for (int i = 0; i != proto.attrs_size(); ++i) {
|
|
|
|
const proto::OpProto::Attr &attr = proto.attrs(i);
|
|
|
|
const proto::OpProto::Attr &attr = proto.attrs(i);
|
|
|
|
if (attr.name() == name) {
|
|
|
|
if (attr.name() == name) {
|
|
|
|