diff --git a/pkg/utensor/Makefile b/pkg/utensor/Makefile new file mode 100644 index 0000000000..de34ac9732 --- /dev/null +++ b/pkg/utensor/Makefile @@ -0,0 +1,16 @@ +PKG_NAME=utensor +PKG_URL=https://github.com/uTensor/uTensor +PKG_VERSION=b22aa5cbc1ef1b3dd42a899b393a9b999afd1305 +PKG_LICENSE=Apache2.0 + +PKG_BASEDIR = $(PKG_BUILDDIR)/src/uTensor + +.PHONY: all + +all: + "$(MAKE)" -C $(PKG_BASEDIR)/core -f $(CURDIR)/Makefile.$(PKG_NAME) + "$(MAKE)" -C $(PKG_BASEDIR)/util -f $(CURDIR)/Makefile.$(PKG_NAME).util + "$(MAKE)" -C $(PKG_BASEDIR)/ops -f $(CURDIR)/Makefile.$(PKG_NAME).ops + + +include $(RIOTBASE)/pkg/pkg.mk diff --git a/pkg/utensor/Makefile.dep b/pkg/utensor/Makefile.dep new file mode 100644 index 0000000000..657b56d8f9 --- /dev/null +++ b/pkg/utensor/Makefile.dep @@ -0,0 +1,4 @@ +FEATURES_REQUIRED += cpp + +USEMODULE += utensor-ops +USEMODULE += utensor-util diff --git a/pkg/utensor/Makefile.include b/pkg/utensor/Makefile.include new file mode 100644 index 0000000000..6b0ee8302c --- /dev/null +++ b/pkg/utensor/Makefile.include @@ -0,0 +1,17 @@ +INCLUDES += -I$(PKGDIRBASE)/utensor +INCLUDES += -I$(PKGDIRBASE)/utensor/src +INCLUDES += -I$(PKGDIRBASE)/utensor/src/uTensor +INCLUDES += -I$(PKGDIRBASE)/utensor/src/uTensor/core +INCLUDES += -I$(PKGDIRBASE)/utensor/src/uTensor/ops +INCLUDES += -I$(PKGDIRBASE)/utensor/src/uTensor/util + +CXXEXFLAGS += -Wno-sign-compare + +ifeq (llvm,$(TOOLCHAIN)) + CXXEXFLAGS += -Wno-unused-variable + CXXEXFLAGS += -Wno-shift-count-negative +endif + +ifneq (native,$(BOARD)) + CXXEXFLAGS += -std=c++11 +endif diff --git a/pkg/utensor/Makefile.utensor b/pkg/utensor/Makefile.utensor new file mode 100644 index 0000000000..21009d92bd --- /dev/null +++ b/pkg/utensor/Makefile.utensor @@ -0,0 +1,5 @@ +MODULE = utensor + +CXXEXFLAGS += -Wno-unused-parameter + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/utensor/Makefile.utensor.ops b/pkg/utensor/Makefile.utensor.ops new file mode 100644 index 0000000000..267fd924ed --- /dev/null +++ b/pkg/utensor/Makefile.utensor.ops @@ -0,0 +1,3 @@ +MODULE = utensor-ops + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/utensor/Makefile.utensor.util b/pkg/utensor/Makefile.utensor.util new file mode 100644 index 0000000000..e5dc1a5361 --- /dev/null +++ b/pkg/utensor/Makefile.utensor.util @@ -0,0 +1,5 @@ +MODULE = utensor-util + +CXXEXFLAGS += -Wno-c++14-binary-literal + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/utensor/doc.txt b/pkg/utensor/doc.txt new file mode 100644 index 0000000000..ce1a8b14e0 --- /dev/null +++ b/pkg/utensor/doc.txt @@ -0,0 +1,7 @@ +/** + * @defgroup pkg_utensor uTensor + * @ingroup pkg + * @brief Provides a package for AI inference based on TensorFlow + * + * @see https://github.com/uTensor/uTensor + */ diff --git a/pkg/utensor/patches/0001-fix-integer-format.patch b/pkg/utensor/patches/0001-fix-integer-format.patch new file mode 100644 index 0000000000..f0366d3c43 Binary files /dev/null and b/pkg/utensor/patches/0001-fix-integer-format.patch differ diff --git a/pkg/utensor/patches/0002-fix-mbed-specific-code.patch b/pkg/utensor/patches/0002-fix-mbed-specific-code.patch new file mode 100644 index 0000000000..3c6b7e60a4 Binary files /dev/null and b/pkg/utensor/patches/0002-fix-mbed-specific-code.patch differ diff --git a/pkg/utensor/patches/0003-fix-variadic-macro.patch b/pkg/utensor/patches/0003-fix-variadic-macro.patch new file mode 100644 index 0000000000..051056af10 Binary files /dev/null and b/pkg/utensor/patches/0003-fix-variadic-macro.patch differ