Skip to content

Commit

Permalink
修改获取Param的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zjhellofss committed Apr 10, 2024
1 parent 3722888 commit fb715cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/runtime/runtime_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ struct RuntimeOperatorBase {

template <typename T>
bool RuntimeOperatorBase<T>::has_attribute(const std::string& attr_name) {
return false;
if (this->attribute.empty()) {
return false;
}
if (this->attribute.find(attr_name) == this->attribute.end()) {
return false;
}
return true;
}

template <typename T>
Expand Down

0 comments on commit fb715cf

Please sign in to comment.