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

Fix merge with dev

parent afdcc69a
Branches
No related tags found
2 merge requests!93Release v0.3.0,!79Refactor OperatorImpl for backend/export
Pipeline #53830 failed
...@@ -24,10 +24,10 @@ namespace Aidge { ...@@ -24,10 +24,10 @@ namespace Aidge {
// compute kernel registry for forward and backward // compute kernel registry for forward and backward
class AbsImplForward_cpu class AbsImplForward_cpu
: public Registrable<AbsImplForward_cpu, std::tuple<DataType, DataType>, void(const std::size_t, const void*, void*)> { : public Registrable<AbsImplForward_cpu, std::tuple<DataType, DataType>, std::function<void(const std::size_t, const void*, void*)>> {
}; };
class AbsImplBackward_cpu class AbsImplBackward_cpu
: public Registrable<AbsImplBackward_cpu, std::tuple<DataType, DataType>, void(const std::size_t, const void*, void*)> { : public Registrable<AbsImplBackward_cpu, std::tuple<DataType, DataType>, std::function<void(const std::size_t, const void*, void*)>> {
}; };
class AbsImpl_cpu : public OperatorImpl { class AbsImpl_cpu : public OperatorImpl {
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
return std::make_unique<AbsImpl_cpu>(op); return std::make_unique<AbsImpl_cpu>(op);
} }
Elts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final; std::shared_ptr<ProdConso> getProdConso() const override { return std::make_unique<ProdConso>(mOp, true); };
void forward() override; void forward() override;
}; };
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
namespace Aidge { namespace Aidge {
// compute kernel registry for forward and backward // compute kernel registry for forward and backward
class AndImplForward_cpu class AndImplForward_cpu
: public Registrable<AndImplForward_cpu, std::tuple<DataType, DataType, DataType>, void(const std::vector<std::size_t>&, const std::vector<std::size_t>&, const std::vector<std::size_t>&, const void*, const void*,void*)> { : public Registrable<AndImplForward_cpu, std::tuple<DataType, DataType, DataType>, std::function<void(const std::vector<std::size_t>&, const std::vector<std::size_t>&, const std::vector<std::size_t>&, const void*, const void*,void*)>> {
}; };
class AndImplBackward_cpu class AndImplBackward_cpu
: public Registrable<AndImplBackward_cpu, std::tuple<DataType, DataType, DataType>, void(const std::vector<std::size_t>&, const std::vector<std::size_t>&, const std::vector<std::size_t>&, const void*, const void*, void*)> { : public Registrable<AndImplBackward_cpu, std::tuple<DataType, DataType, DataType>, std::function<void(const std::vector<std::size_t>&, const std::vector<std::size_t>&, const std::vector<std::size_t>&, const void*, const void*, void*)>> {
}; };
class AndImpl_cpu : public OperatorImpl { class AndImpl_cpu : public OperatorImpl {
...@@ -37,7 +37,7 @@ public: ...@@ -37,7 +37,7 @@ public:
return std::make_unique<AndImpl_cpu>(op); return std::make_unique<AndImpl_cpu>(op);
} }
Elts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final; std::shared_ptr<ProdConso> getProdConso() const override { return std::make_unique<ProdConso>(mOp, true); };
void forward() override; void forward() override;
}; };
......
...@@ -26,19 +26,19 @@ namespace Aidge { ...@@ -26,19 +26,19 @@ namespace Aidge {
class ArgMaxImplForward_cpu class ArgMaxImplForward_cpu
: public Registrable<ArgMaxImplForward_cpu, : public Registrable<ArgMaxImplForward_cpu,
std::tuple<DataType, DataType>, std::tuple<DataType, DataType>,
void(std::int32_t, std::function<void(std::int32_t,
DimSize_t, DimSize_t,
const std::vector<DimSize_t>&, const std::vector<DimSize_t>&,
const void *, const void *,
void *)> {}; void *)>> {};
class ArgMaxImplBackward_cpu class ArgMaxImplBackward_cpu
: public Registrable<ArgMaxImplBackward_cpu, : public Registrable<ArgMaxImplBackward_cpu,
std::tuple<DataType, DataType>, std::tuple<DataType, DataType>,
void(std::int32_t, std::function<void(std::int32_t,
DimSize_t, DimSize_t,
const std::vector<DimSize_t>&, const std::vector<DimSize_t>&,
const void *, const void *,
void *)> {}; void *)>> {};
class ArgMaxImpl_cpu : public OperatorImpl { class ArgMaxImpl_cpu : public OperatorImpl {
public: public:
......
...@@ -26,19 +26,19 @@ namespace Aidge { ...@@ -26,19 +26,19 @@ namespace Aidge {
class ReduceSumImplForward_cpu class ReduceSumImplForward_cpu
: public Registrable<ReduceSumImplForward_cpu, : public Registrable<ReduceSumImplForward_cpu,
std::tuple<DataType, DataType>, std::tuple<DataType, DataType>,
void(const std::vector<std::int32_t>&, std::function<void(const std::vector<std::int32_t>&,
DimSize_t, DimSize_t,
const std::vector<DimSize_t>&, const std::vector<DimSize_t>&,
const void *, const void *,
void *)> {}; void *)>> {};
class ReduceSumImpl1DBackward_cpu class ReduceSumImpl1DBackward_cpu
: public Registrable<ReduceSumImpl1DBackward_cpu, : public Registrable<ReduceSumImpl1DBackward_cpu,
std::tuple<DataType, DataType>, std::tuple<DataType, DataType>,
void(const std::vector<std::int32_t>&, std::function<void(const std::vector<std::int32_t>&,
DimSize_t, DimSize_t,
const std::vector<DimSize_t>&, const std::vector<DimSize_t>&,
const void *, const void *,
void *)> {}; void *)>> {};
class ReduceSumImpl_cpu : public OperatorImpl { class ReduceSumImpl_cpu : public OperatorImpl {
public: public:
......
...@@ -19,11 +19,6 @@ ...@@ -19,11 +19,6 @@
#include "aidge/operator/Abs.hpp" #include "aidge/operator/Abs.hpp"
#include "aidge/utils/Types.h" #include "aidge/utils/Types.h"
Aidge::Elts_t Aidge::AbsImpl_cpu::getNbRequiredProtected(const Aidge::IOIndex_t /*inputIdx*/) const {
// this implementation can be in-place
return Elts_t::DataElts(0);
}
void Aidge::AbsImpl_cpu::forward() { void Aidge::AbsImpl_cpu::forward() {
const Abs_Op& op = static_cast<const Abs_Op&>(mOp); const Abs_Op& op = static_cast<const Abs_Op&>(mOp);
......
...@@ -23,11 +23,6 @@ ...@@ -23,11 +23,6 @@
#include "aidge/backend/cpu/operator/AndImpl.hpp" #include "aidge/backend/cpu/operator/AndImpl.hpp"
#include "aidge/backend/cpu/operator/AndImpl_forward_kernels.hpp" #include "aidge/backend/cpu/operator/AndImpl_forward_kernels.hpp"
Aidge::Elts_t Aidge::AndImpl_cpu::getNbRequiredProtected(const Aidge::IOIndex_t /*inputIdx*/) const {
// this implementation can be in-place
return Elts_t::DataElts(0);
}
void Aidge::AndImpl_cpu::forward() { void Aidge::AndImpl_cpu::forward() {
// Find the correct kernel type // Find the correct kernel type
auto kernelFunc = Registrar<AndImplForward_cpu>::create({ auto kernelFunc = Registrar<AndImplForward_cpu>::create({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment