Skip to content
Snippets Groups Projects
Commit d3eb5091 authored by Cyril Moineau's avatar Cyril Moineau Committed by Maxence Naud
Browse files

Update clone function with SET_IMPL_MACRO.

parent 108727b7
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!85Initial working python registrar.
...@@ -55,7 +55,11 @@ public: ...@@ -55,7 +55,11 @@ public:
: OperatorTensor(op), : OperatorTensor(op),
Attributes_(op) Attributes_(op)
{ {
mImpl = op.mImpl ? Registrar<Softmax_Op>::create(op.mOutputs[0]->getImpl()->backend())(*this) : nullptr; if (op.mImpl){
SET_IMPL_MACRO(Softmax_Op, *this, op.mOutputs[0]->getImpl()->backend());
}else{
mImpl = nullptr;
}
} }
/** /**
......
...@@ -45,7 +45,11 @@ public: ...@@ -45,7 +45,11 @@ public:
Sqrt_Op(const Sqrt_Op& op) Sqrt_Op(const Sqrt_Op& op)
: OperatorTensor(op) : OperatorTensor(op)
{ {
mImpl = op.mImpl ? Registrar<Sqrt_Op>::create(op.mOutputs[0]->getImpl()->backend())(*this) : nullptr; if (op.mImpl){
SET_IMPL_MACRO(Sqrt_Op, *this, op.mOutputs[0]->getImpl()->backend());
}else{
mImpl = nullptr;
}
} }
/** /**
......
...@@ -45,7 +45,11 @@ public: ...@@ -45,7 +45,11 @@ public:
Sub_Op(const Sub_Op& op) Sub_Op(const Sub_Op& op)
: OperatorTensor(op) : OperatorTensor(op)
{ {
mImpl = op.mImpl ? Registrar<Sub_Op>::create(op.mOutputs[0]->getImpl()->backend())(*this) : nullptr; if (op.mImpl){
SET_IMPL_MACRO(Sub_Op, *this, op.mOutputs[0]->getImpl()->backend());
}else{
mImpl = nullptr;
}
} }
/** /**
......
...@@ -56,7 +56,11 @@ class Transpose_Op : public OperatorTensor, ...@@ -56,7 +56,11 @@ class Transpose_Op : public OperatorTensor,
: OperatorTensor(op), : OperatorTensor(op),
Attributes_(op) Attributes_(op)
{ {
mImpl = op.mImpl ? Registrar<Transpose_Op<DIM>>::create(mOutputs[0]->getImpl()->backend())(*this) : nullptr; if (op.mImpl){
SET_IMPL_MACRO(Transpose_Op<DIM>, *this, op.mOutputs[0]->getImpl()->backend());
}else{
mImpl = nullptr;
}
} }
/** /**
......
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