Skip to content
Snippets Groups Projects
Commit 8e449e0f authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Do not addAttr with any!

parent ba485855
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!186Refactor OperatorImpl for backend/export
Pipeline #54096 passed
......@@ -84,24 +84,12 @@ void Aidge::MetaOperator_Op::setBackend(const std::string &name, Aidge::DeviceId
std::shared_ptr<Aidge::Attributes> Aidge::MetaOperator_Op::attributes() const {
auto attrs = std::make_shared<DynamicAttributes>();
std::set<std::string> nonUniqueGlobalAttrs;
for (const auto& node : mGraph->getRankedNodesName("{3}")) {
const auto nodeAttrs = node.first->getOperator()->attributes()->getAttrs();
for (const auto& attr : nodeAttrs) {
attrs->addAttr(node.first->type() + "#" + node.second + "." + attr.first, attr.second);
if (node.second == "0") {
attrs->addAttr(node.first->type() + "." + attr.first, attr.second);
if (nonUniqueGlobalAttrs.find(attr.first) == nonUniqueGlobalAttrs.end()) {
if (!attrs->hasAttr(attr.first)) {
attrs->addAttr(attr.first, attr.second);
}
else {
attrs->delAttr(attr.first);
nonUniqueGlobalAttrs.insert(attr.first);
}
}
}
const auto nodeAttrs = DynamicAttributes(node.first->getOperator()->attributes()->getAttrs());
attrs->addAttr(node.first->type() + "#" + node.second, nodeAttrs);
if (node.second == "0") {
attrs->addAttr(node.first->type(), nodeAttrs);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment