@@ -102,6 +102,7 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages swig)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
+ #:use-module (gnu packages vulkan)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xdisorg)
@@ -749,6 +750,37 @@ (define (delete-ifdefs file)
in terms of new algorithms.")
(license license:gpl3+)))
+(define-public ncnn
+ (package
+ (name "ncnn")
+ (version "20220729")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Tencent/ncnn")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "02na1crxph8m3sqb1c32v83ppxjcmaxyncql89q5mf9ggddmx5c5"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DNCNN_AVX=OFF"
+ "-DNCNN_BUILD_TESTS=TRUE"
+ "-DNCNN_SYSTEM_GLSLANG=ON"
+ (string-append "-DGLSLANG_TARGET_DIR="
+ #$(this-package-input "glslang")
+ "/lib/cmake")
+ "-DNCNN_VULKAN=ON")
+ #:tests? #f)) ; XXX: half of the tests fail
+ (inputs (list glslang vulkan-headers vulkan-loader))
+ (native-inputs (list protobuf))
+ (home-page "https://github.com/Tencent/ncnn")
+ (synopsis "Neural network for mobile platforms")
+ (description "NCNN is a framework for building neural networks written in
+C++. It supports parallel computing as well as GPU acceleration via Vulkan.")
+ (license license:bsd-3)))
+
(define-public onnx
(package
(name "onnx")