From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mA9bNOCHw2RwGgAASxT56A (envelope-from ) for ; Fri, 28 Jul 2023 11:18:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qNkrNOCHw2SyzwAAauVa8A (envelope-from ) for ; Fri, 28 Jul 2023 11:18:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3C0A253F08 for ; Fri, 28 Jul 2023 11:18:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=kIrysZTv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690535904; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qf8jt7cxX75JL2Mj1YNHEvW7auI3ljSMHx8NHlUtAyE=; b=gMaU9VI0D7bdW8+N9U9ltswO7PO6+dRry2GcGugAqC8ytCc79qgWjp4zyO8jMt1H/ubbZv 0bkPvw/b6cJZCWQwPsELcXpHzUBS8Z64Q+uO/S9AC66gedJ6PqdZKEuVUYmIMYvloZWBno dZCgohfsGqnfHW5p0G9M7CyFvjJhywT2AmsgiDnUtDP6Gg4nFmZNI/ygNiBpgp8EoCyalV CWeCxoNHqWpaRNSNDJyGJnT3fGQI6ULJU3N1xOs+lyJnqYtPLNVzh0ZyIxtLKvvI0IVhGK 7c5Pzk/9OckhYDqrFX1Wc8UJIxNxg7+bP0YOaHC5R/2lTvGARB6G7jzNpsn7rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=kIrysZTv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690535904; a=rsa-sha256; cv=none; b=VD5Jy7ek+JB4mUZuD2njUqkQgBvwhN1X0Pu7whlgunYdBUY79TpUERwuVgFtL+D6vaoNu0 +Q13+cUn7e5bVKSQw3FMGFVI3fmt3rzOJXO5fh/IccN4E/pHXrwl0qUTglbaKNpC7A3kbJ zsUYTXXtO/apr0pz+00Xe9yoXo7+iYIJ8BPcSubCNnIRdA7b5W+3DruL3YYDrTmU48H97P 4i/PRXC8OabTmI5UmrA7qIYrxmwkFm26o/K97+knUaD6BzCLQKM2RW7RqKT74ZVTg3hRaW yVipA4LtOBLcG/HzJk96xTHkt7Fx3A6tGJ/z8mChX0M8rvmZaDxRt4KUDvGXAg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPJ5w-00026v-OD; Fri, 28 Jul 2023 04:45:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPJ5u-00026W-9f for guix-patches@gnu.org; Fri, 28 Jul 2023 04:45:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPJ5t-0007Sh-V8 for guix-patches@gnu.org; Fri, 28 Jul 2023 04:45:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPJ5p-0004Xh-KR; Fri, 28 Jul 2023 04:45:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63897] [PATCH v5] gnu: tensorflow-lite: Update to 2.12.1 References: In-Reply-To: Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net, guix-patches@gnu.org Resent-Date: Fri, 28 Jul 2023 08:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63897 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63897@debbugs.gnu.org Cc: Andy Tai , Andreas Enge , Efraim Flashner , Eric Bavier X-Debbugs-Original-Xcc: Andreas Enge , Efraim Flashner , Eric Bavier Received: via spool by 63897-submit@debbugs.gnu.org id=B63897.169053387017403 (code B ref 63897); Fri, 28 Jul 2023 08:45:01 +0000 Received: (at 63897) by debbugs.gnu.org; 28 Jul 2023 08:44:30 +0000 Received: from localhost ([127.0.0.1]:43597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPJ5J-0004Wc-1P for submit@debbugs.gnu.org; Fri, 28 Jul 2023 04:44:29 -0400 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]:55741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPJ5G-0004WK-B5 for 63897@debbugs.gnu.org; Fri, 28 Jul 2023 04:44:27 -0400 Received: by mail-qk1-x72a.google.com with SMTP id af79cd13be357-76c4890a220so142366685a.3 for <63897@debbugs.gnu.org>; Fri, 28 Jul 2023 01:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690533860; x=1691138660; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=qf8jt7cxX75JL2Mj1YNHEvW7auI3ljSMHx8NHlUtAyE=; b=kIrysZTveWvMruGWZFxZcQ6mRNRJQaS0m1wouHHBhV/8k3WmADld/BnCXDv010OwX5 W1uj+fmzNer7jW0yNCeiohs90GKhE3J4Udx+c7qzzX+ckEkeqEJob1kSHRqzpd1FLqpG oc3ckvBAF2ZKM9jpNSwP2jPHwwkFZy69IWKR2hLmkCKU3bkQV3gndWqujehZb8Spa1Dp OXQUcindN9BxElwkIHkmJMh2NWX6tcB8uqj6UeyhYEmqs8UtlB1LJRr0ALaTf6ez83Gw uyW30gghNU4x0ux/IZysYI/qi2XIc2dlZAX1bA31n+AdEoc7iOEa7kGXxNXTKc+u8S7U QPpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690533860; x=1691138660; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qf8jt7cxX75JL2Mj1YNHEvW7auI3ljSMHx8NHlUtAyE=; b=F1rTp0LvzmbL4u7sWSUv1TtLv3iU0fp/XtbbshL61VuOhOn32VVZLdAYiwqjNC9RLw n2qqq6K5foEvxquE5xtkD0Ux9cAWJzTT/Bj0PujUjx6HXmEK9i7sU9pOzUofCNHXoh0Q cTKUEPRVS67I0NAhopvJXEjkXVO71nWH1qWJoiu3SQ4waYnBaUqV91l6hsM4jGdMrr3Y mhR0GmjltUz0B7xaGzkBcY8WW2ERSpfDcWPpO3za0WGqJibKy5WkzeQCGbnUA1bUEkxz Or/WR1JfiFMu7NKVQjYjFAhTUWyOJKiBbQoEX6tx0NKq1VwNmSvV1tFHJgiWQ6A2TOH5 hfKQ== X-Gm-Message-State: ABy/qLadEk9xxyxHivdCEODLytGDa5mrvKlcdYZZNtzfeXJAgLsTYN3X heKS76j2tQLJvt5ifU2pqm8l3vLSPYFC5g== X-Google-Smtp-Source: APBJJlH0kn1mol501PwW+pzorq5APYTj9WgjfMrCGpWismlp+r+euH7lFUPZFp8vb1df3TalGVK0eA== X-Received: by 2002:a05:620a:130b:b0:767:614f:322c with SMTP id o11-20020a05620a130b00b00767614f322cmr1834258qkj.18.1690533860041; Fri, 28 Jul 2023 01:44:20 -0700 (PDT) Received: from localhost.localdomain ([98.37.226.98]) by smtp.googlemail.com with ESMTPSA id y8-20020a17090a474800b0025ea87b97b9sm21516634pjg.0.2023.07.28.01.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 01:44:19 -0700 (PDT) From: Andy Tai Date: Fri, 28 Jul 2023 01:44:14 -0700 Message-ID: <60f8a10d1291b1283b17af6b034a6aeff1e503a3.1690533806.git.atai@atai.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: 3.86 X-Migadu-Queue-Id: 3C0A253F08 X-Migadu-Spam-Score: 3.86 X-Migadu-Scanner: mx0.migadu.com X-TUID: 8yXxDmp8+6YN * gnu/packages/algebra.scm (eigen-for-tensorflow-lite): Remove variable * gnu/packages/machine-learning.scm (tensorflow-lite): Update to 2.12.1 [arguments] (configure-flags): Turn on GPU and RUY use; Use cmake to find packages already in Guix as dependencies for absl-cpp, eigen, flatbuffer, neon2ssl, cpuinfo, ruy. [arguments] (phases): Remove operations setting up absl-cpp, eigen, ruy, and neon2ssl as native inouts as now we use Guix's packages of these as dependencies. Do default build phase. Add steps to install C shared library and benchmark_model tool [arguments] (inputs): Add cpuinfo, eigen, fp16, mesa-header, opencl, pthreadpool, ruy, vulkan and xnnpack as explicit inputs [arguments] (native-inputs): Remove local setup of neon2ssl and ruy as we now use Guix's packages of these as explicit dependencies * gnu/packages/maths.scm: Remove extra statement * gnu/packages/serialization.scm (flatbuffers-next-shared): New variable, flatbuffers-next built with -fPIC as needed by tensorflow-lite --- gnu/packages/algebra.scm | 32 ------ gnu/packages/machine-learning.scm | 177 ++++++++++++++++++------------ gnu/packages/maths.scm | 1 - gnu/packages/serialization.scm | 12 ++ 4 files changed, 117 insertions(+), 105 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index a717750c7b..b1ab755144 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1154,38 +1154,6 @@ (define-public eigen-for-tensorflow (substitute* "test/CMakeLists.txt" (("ei_add_test\\(stddeque") "#"))))))))))) -(define-public eigen-for-tensorflow-lite - ;; This commit was taken from - ;; tensorflow/lite/tools/cmake/modules/eigen.cmake - (let ((commit "d10b27fe37736d2944630ecd7557cefa95cf87c9") - (revision "1")) - (package (inherit eigen) - (name "eigen-for-tensorflow-lite") - (version (git-version "3.3.7" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.com/libeigen/eigen") - (commit commit))) - (sha256 - (base32 - "0v8a20cwvwmp3hw4275b37frw33v92z0mr8f4dn6y8k0rz92hrrf")) - (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet - ;; Ther are test failures in the "unsupported" directory, but - ;; maintainers say it's unsupported anyway, so just skip - ;; them. - '(begin - (substitute* "unsupported/CMakeLists.txt" - (("add_subdirectory\\(test.*") - "# Do not build the tests for unsupported features.\n")))))) - (arguments - (substitute-keyword-arguments (package-arguments eigen) - ((#:phases phases) - `(modify-phases ,phases - (delete 'disable-some-tests)))))))) - (define-public xtensor (package (name "xtensor") diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e8225c76f3..6ae9c52625 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -55,12 +55,14 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages) #:use-module (gnu packages adns) #:use-module (gnu packages algebra) + #:use-module (gnu packages assembly) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cmake) @@ -89,6 +91,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages ninja) #:use-module (gnu packages ocaml) #:use-module (gnu packages onc-rpc) + #:use-module (gnu packages opencl) #:use-module (gnu packages parallel) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -100,6 +103,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages regex) #:use-module (gnu packages rpc) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) @@ -108,6 +112,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages swig) #:use-module (gnu packages time) #:use-module (gnu packages tls) + #:use-module (gnu packages vulkan) #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xml) @@ -2908,7 +2913,7 @@ (define-public tensorflow (define-public tensorflow-lite (package (name "tensorflow-lite") - (version "2.5.0") + (version "2.12.1") (source (origin (method git-fetch) @@ -2918,59 +2923,85 @@ (define-public tensorflow-lite (file-name (git-file-name name version)) (sha256 (base32 - "1jdw2i1rq06zqd6aabh7bbm0avsg4pygnfmd7gviv0blhih9054l")))) + "0jkgljdagdqllnxygl35r5bh3f9qmbczymfj357gm9krh59g2kmd")))) (build-system cmake-build-system) (arguments - `(#:tests? #false ; no "check" target + `(#:tests? #false ;tests not building now #:build-type "Release" + + #:modules ((ice-9 match) + (guix build utils) + (guix build cmake-build-system)) + #:configure-flags (list - "-DTFLITE_ENABLE_GPU=OFF" - "-DTFLITE_ENABLE_RUY=OFF" + ; "-DTFLITE_KERNEL_TEST=ON" ; TO DO: build tests + ;; so cmake can be used to find this from other packages + "-DTFLITE_ENABLE_INSTALL=ON" + + ;; Use Guix's own packages as dependencies. + "-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON" + + "-DTFLITE_ENABLE_GPU=ON" + "-DTFLITE_ENABLE_RUY=ON" + + ;; TO DO: turn on Farmhash + ;"-DSYSTEM_FARMHASH=ON" + + + (string-append "-Dabsl_DIR=" (assoc-ref %build-inputs "abseil-cpp") + "/lib/cmake/absl") + (string-append "-DEigen3_DIR=" (assoc-ref %build-inputs "eigen") + "/share/eigen3/cmake") + (string-append "-DFlatBuffers_DIR=" (assoc-ref %build-inputs "flatbuffers") + "/lib/cmake/flatbuffers") + (string-append "-DNEON_2_SSE_DIR=" (assoc-ref %build-inputs "neon2sse") + "/lib/cmake/NEON_2_SSE") + (string-append "-Dcpuinfo_DIR=" (assoc-ref %build-inputs "cpuinfo") + "/share/cpuinfo") + (string-append "-Druy_DIR=" (assoc-ref %build-inputs "ruy") + "/lib/cmake/ruy") ;; TODO: The build system attempts to build xnnpack from source. We ;; would like to use our xnnpack package here, but this requires more ;; work. "-DTFLITE_ENABLE_XNNPACK=OFF" - ;; Pretend we've already fetched abseil. We won't actually build it - ;; but use the existing package. - "-Dabseil-cpp_POPULATED=TRUE" - - ;; Don't fetch the sources. We have already built flatbuffers. - "-Dflatbuffers_POPULATED=TRUE" + ;;; Don't fetch the sources. We have these already + "-Degl_headers_POPULATED=TRUE" + "-Dfp16_headers_POPULATED=TRUE" + "-Dopencl_headers_POPULATED=TRUE" + "-Dopengl_headers_POPULATED=TRUE" + "-Dvulkan_headers_POPULATED=TRUE" + "-Dgoogletest_POPULATED=TRUE" + "-Dgoogle_benchmark_POPULATED=TRUE" + "-Dnsync_POPULATED=TRUE" + "-Dre2_POPULATED=TRUE" "-DFFT2D_SOURCE_DIR=/tmp/fft2d" - "-Dneon2sse_SOURCE_DIR=/tmp/neon2sse" - "-Dneon2sse_BINARY_DIR=/tmp/neon2sse-bin" "-DFARMHASH_SOURCE_DIR=/tmp/farmhash" "-Dgemmlowp_SOURCE_DIR=/tmp/gemmlowp" - (string-append "-DRUY_SOURCE_DIR=" - (assoc-ref %build-inputs "ruy-src"))) + ) #:phases (modify-phases %standard-phases (add-after 'unpack 'chdir (lambda _ (chdir "tensorflow/lite"))) (add-after 'chdir 'copy-sources (lambda* (#:key inputs #:allow-other-keys) - ;; Use external cmake finders instead of these stubs that won't - ;; find anything but the bundled sources. - (delete-file "tools/cmake/modules/Findabsl.cmake") - (delete-file "tools/cmake/modules/Findeigen.cmake") + ;; TO DO: properly use Guix's pthreaqdpool + ;; roght now not using pthreadpool because + ;; we are not enabling xnnpack (substitute* "CMakeLists.txt" - (("find_package\\(eigen REQUIRED") - "find_package(eigen REQUIRED NAMES Eigen3")) - (substitute* "tools/cmake/modules/Findflatbuffers.cmake" - (("get_target_property.*") - (format #false "set(FLATBUFFERS_INCLUDE_DIRS ~a/include)\n" - (assoc-ref inputs "flatbuffers")))) + (("if\\(NOT DEFINED PTHREADPOOL_SOURCE_DIR\\)") + "if(false)")) + (substitute* "CMakeLists.txt" + (("if\\(NOT TARGET pthreadpool\\)") + "if(false)")) ;; Don't fetch source code; we already have everything we need. (substitute* '("tools/cmake/modules/fft2d.cmake" - "tools/cmake/modules/ruy.cmake" "tools/cmake/modules/farmhash.cmake" - "tools/cmake/modules/neon2sse.cmake" "tools/cmake/modules/gemmlowp.cmake") (("OverridableFetchContent_Populate.*") "")) @@ -2984,31 +3015,56 @@ (define-public tensorflow-lite (invoke "tar" "--strip-components=1" "-xf" (assoc-ref inputs "fft2d-src"))) - (copy-recursively (assoc-ref inputs "neon2sse-src") - "/tmp/neon2sse/") (copy-recursively (assoc-ref inputs "gemmlowp-src") "/tmp/gemmlowp/"))) - (add-after 'copy-sources 'prepare-shared-library-build - (lambda _ (chdir "c"))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (headers (string-append out "/include/tensorflow/lite"))) - (install-file "../build/libtensorflowlite_c.so" lib) - (with-directory-excursion ".." - (for-each - (lambda (file) - (let ((target-dir (string-append headers "/" (dirname file)))) - (install-file file target-dir))) - (find-files "." "\\.h$"))))))))) + + (add-after 'build 'build-shared-library + (lambda* (#:key configure-flags #:allow-other-keys) + (mkdir-p "c") + (with-directory-excursion "c" + (apply invoke "cmake" (append configure-flags (list "../../lite/c"))) + (invoke "cmake" "--build" "." "-j" (number->string + (parallel-job-count)))))) + (add-after 'build-shared-library 'build-benchmark-model + (lambda _ + (invoke "cmake" "--build" "." "--target" "benchmark_model" + "-j" (number->string (parallel-job-count))))) + + (add-after 'install 'install-extra + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (bin (string-append out "/bin"))) + (install-file "../build/c/libtensorflowlite_c.so" lib) + (install-file "../build/tools/benchmark/benchmark_model" bin)))) + ; TO DO: test not building now + ; (replace 'check + ; (lambda* (#:key tests? #:allow-other-keys) + ; (when tests? + ; (invoke "ctest" "-L" "plain")))) + ))) (inputs `(("abseil-cpp" ,abseil-cpp-20200923.3) - ("eigen" ,eigen-for-tensorflow-lite) - ("flatbuffers" ,flatbuffers) - ("python" ,python))) + ("cpuinfo" ,cpuinfo) + ("eigen" ,eigen) + ("fp16" ,fp16) + ("flatbuffers" ,flatbuffers-next-shared) + ;("gemmlowp" ,gemmlowp) ;; TO DO + ("mesa-headers" ,mesa-headers) + ("neon2sse" ,neon2sse) + ("nsync" ,nsync) + ("opencl-clhpp" ,opencl-clhpp) + ("opencl-headers" ,opencl-headers) + ("opencl-icd-loader" ,opencl-icd-loader) + ("pthreadpool" ,pthreadpool) + ("python" ,python) + ("ruy" ,ruy) + ("re2" ,re2) + ;("xnnpack" ,xnnpack) ;; TO DO: properly use Guix's copy of xnnpack + ("vulkan-headers" , vulkan-headers))) (native-inputs `(("pkg-config" ,pkg-config) + ("googletest" ,googletest) ("gemmlowp-src" ;; The commit hash is taken from ;; "tensorflow/lite/tools/cmake/modules/gemmlowp.cmake". @@ -3022,17 +3078,6 @@ (define-public tensorflow-lite (sha256 (base32 "1sbp8kmr2azwlvfbzryy1frxi99jhsh1nc93bdbxdf8zdgpv0kxl"))))) - ("neon2sse-src" - ,(let ((commit "a1652fd5253afbf3e39357b012974f93511f6108")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/intel/ARM_NEON_2_x86_SSE") - (commit commit))) - (file-name (git-file-name "neon2sse" (string-take commit 8))) - (sha256 - (base32 - "1q8gkxag9wlnwdwad2pclsrkwzrdjy94hyrkayrsvxyj7szb5y8i"))))) ("farmhash-src" ,(let ((commit "816a4ae622e964763ca0862d9dbd19324a1eaf45")) (origin @@ -3048,24 +3093,12 @@ (define-public tensorflow-lite ,(origin (method url-fetch) (uri (string-append "https://storage.googleapis.com/" - "mirror.tensorflow.org/" - "www.kurims.kyoto-u.ac.jp/~ooura/fft2d.tgz")) + "mirror.tensorflow.org/github.com/petewarden/" + "OouraFFT/archive/v1.0.tar.gz")) (file-name "fft2d.tar.gz") (sha256 (base32 - "1jfflzi74fag9z4qmgwvp90aif4dpbr1657izmxlgvf4hy8fk9xd")))) - ("ruy-src" - ,(let ((commit "9c56af3fce210a8a103eda19bd6f47c08a9e3d90")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/google/ruy") - (commit commit) - (recursive? #true))) - (file-name (git-file-name "ruy" (string-take commit 8))) - (sha256 - (base32 - "1cfd5gk6kaj8kbl3h98gx1ap8czd59y6p8qq8nr28fklpyzf5cis"))))))) + "1jfflzi74fag9z4qmgwvp90aif4dpbr1657izmxlgvf4hy8fk9xd")))))) (home-page "https://tensorflow.org") (synopsis "Machine learning framework") (description diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b2cb0a7308..4c92b22bac 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -86,7 +86,6 @@ (define-module (gnu packages maths) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix gexp) #:use-module (guix utils) #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (guix build-system ant) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 1f8c128eba..0a45920894 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -807,6 +807,18 @@ (define-public flatbuffers-next (base32 "1z3a6l8g2y53i5xzraswfs2i0i3kk52zv7nzc2q3fgisbyiri3pz")))))) +(define-public flatbuffers-next-shared + (package + (inherit flatbuffers-next) + (name "flatbuffers-shared") + (version "23.1.21") + (arguments + (substitute-keyword-arguments (package-arguments flatbuffers-next) + ((#:configure-flags flags) + ;; make C++ fiels compiled with -fPIC, needed for shared lib". + #~(cons "-DFLATBUFFERS_CXX_FLAGS=-fPIC" #$flags)))))) + + (define-public python-feather-format (package (name "python-feather-format") base-commit: 35c8d631d2bd63c64e863b5509f29fdcb7f856e6 prerequisite-patch-id: 36485dd2de3da6fe04218b9a9fb621d749609628 prerequisite-patch-id: 6a623f7c3bdc733b110fd6f59f31032adb7d987d prerequisite-patch-id: 4b8245be9f9ab7b2cf9713a404b7d1632d945278 -- 2.41.0