From 04121fcd461462638f118088aa43ddce25bcba14 Mon Sep 17 00:00:00 2001 From: "Efimov Alexander/AI Tools Lab/./Samsung Electronics" Date: Tue, 24 Jul 2018 16:31:47 +0300 Subject: [PATCH] Add support library function stubs (#707) This commit adds stubs for support and operation functions to allow artifact build Signed-off-by: Efimov Alexander --- .../libs/backend/soft/include/cpp_header_types.def | 6 +- .../libs/backend/soft/include/cpp_operations.def | 71 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/contrib/nnc/libs/backend/soft/include/cpp_header_types.def b/contrib/nnc/libs/backend/soft/include/cpp_header_types.def index 356d597..bab93bf 100644 --- a/contrib/nnc/libs/backend/soft/include/cpp_header_types.def +++ b/contrib/nnc/libs/backend/soft/include/cpp_header_types.def @@ -1,3 +1,7 @@ +#include +#include +#include + const int MAX_DIMS = 8; template @@ -95,7 +99,7 @@ public: void fillData(const float *data) { assert(_managed); - for (int i = 0; i < _shape.getVolume(); ++i) + for (size_t i = 0; i < _shape.getVolume(); ++i) _data[i] = data[i]; } diff --git a/contrib/nnc/libs/backend/soft/include/cpp_operations.def b/contrib/nnc/libs/backend/soft/include/cpp_operations.def index e69de29..34ca99a 100644 --- a/contrib/nnc/libs/backend/soft/include/cpp_operations.def +++ b/contrib/nnc/libs/backend/soft/include/cpp_operations.def @@ -0,0 +1,71 @@ +#include +#include + +using namespace std; + +void readParameters(char *&data, size_t &len, const string &path, uint32_t version, uint32_t hash) +{ + // TODO map file to memory, check version and hash equality +} + +void releaseParameters(char *data, size_t len) +{ + // TODO unmap file from memory +} + +template +void concat(Tensor &out, const char *params, Args &...args) +{ + // TODO call actual function +} + +void conv2d(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void depthwiseConv2d(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void softmax(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void maxPool(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void avgPool(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void fullConnect(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void cappedRelu(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void biasAdd(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void relu(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + +void reshape(Tensor &out, const char *params, const Tensor &in) +{ + // TODO call actual function +} + -- 2.7.4