Skip to content
Snippets Groups Projects
Commit a7ec11eb authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Merge branch 'MetaOpRegisterFix' into 'dev'

Use SET_IMPL_MACRO for metaop.

See merge request !352
parents 2440e3dd b29f4d7b
No related branches found
No related tags found
3 merge requests!414Update version 0.5.1 -> 0.6.0,!408[Add] Dropout Operator,!352Use SET_IMPL_MACRO for metaop.
Pipeline #66318 passed
......@@ -19,6 +19,8 @@
#include "aidge/graph/GraphView.hpp"
#include "aidge/utils/ErrorHandling.hpp"
#include "aidge/utils/DynamicAttributes.hpp"
#include "aidge/utils/Registrar.hpp" // SET_IMPL_MACRO
Aidge::MetaOperator_Op::MetaOperator_Op(const std::string& type, const std::shared_ptr<GraphView>& graph, const std::vector<InputCategory>& forcedInputsCategory)
: OperatorTensor(type, [graph, forcedInputsCategory]() {
......@@ -113,8 +115,7 @@ std::string Aidge::MetaOperator_Op::backend() const noexcept {
void Aidge::MetaOperator_Op::setBackend(const std::string &name, Aidge::DeviceIdx_t device) {
if (Registrar<MetaOperator_Op>::exists({name, type()})) {
// A custom implementation exists for this meta operator
mImpl = Registrar<MetaOperator_Op>::create({name, type()})(*this);
SET_IMPL_MACRO(MetaOperator_Op, *this, {name, type()});
// Set backend for in/out tensor of the MetaOp
for(auto i: mGraph->inputNodes()){
auto op_i = std::static_pointer_cast<OperatorTensor>(i->getOperator());
......
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