summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorAndy Tai <atai@atai.org>2025-08-23 23:47:31 -0700
committerLudovic Courtès <ludo@gnu.org>2025-08-25 12:17:01 +0200
commitf353a76ad1633056fb0810db18705def2e7b3532 (patch)
tree4b390fd21431b79580311132d4aec25180ab007f /gnu/packages
parentb757e69b176e84da3d91c8b1472d3ca180546e3b (diff)
gnu: tensorflow-lite: Fix build.
* gnu/packages/machine-learning.scm (tensorflow-lite): Fix build. [inputs]: Replace old abseil-cpp with current version. [phases]: Add stages to patch sources for build with current versions of abseil-cpp and opencl. Change-Id: I8fb2836d9f2337fb01f81aebc9a3ab6ae08e642a Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/machine-learning.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7f24a449fe3..f57160e21f5 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3976,6 +3976,21 @@ advanced research.")
(with-directory-excursion "/tmp/fft2d"
(invoke "tar" "--strip-components=1"
"-xf" (assoc-ref inputs "fft2d-src")))))
+ (add-after 'copy-sources 'opencl-fix
+ (lambda _ (substitute* "delegates/gpu/cl/opencl_wrapper.h"
+ (("cl_ndrange_kernel_command_properties_khr")
+ "cl_command_properties_khr"))))
+ (add-after 'opencl-fix 'absl-fix
+ (lambda _ (substitute* '(
+ "delegates/gpu/cl/cl_operation.h"
+ "delegates/gpu/common/task/qcom_thin_filter_desc.cc"
+ "delegates/gpu/common/tasks/special/thin_pointwise_fuser.cc")
+ (("#include <vector>")
+ "#include <vector>\n\n#include \"absl/strings/str_cat.h\"\n"))))
+ (add-after 'opencl-fix 'stdint-fix
+ (lambda _ (substitute* "kernels/internal/spectrogram.cc"
+ (("#include <math.h>")
+ "#include <math.h>\n#include <cstdint>\n"))))
(add-after 'build 'build-shared-library
(lambda* (#:key configure-flags #:allow-other-keys)
(mkdir-p "c")
@@ -4000,7 +4015,7 @@ advanced research.")
(when tests?
(invoke "ctest" "-L" "plain")))))))
(inputs
- `(("abseil-cpp" ,abseil-cpp-20200923.3)
+ `(("abseil-cpp" ,abseil-cpp)
("cpuinfo" ,cpuinfo)
("eigen" ,eigen)
("fp16" ,fp16)