diff options
Diffstat (limited to 'gnu/packages/patches')
| -rw-r--r-- | gnu/packages/patches/hwloc-add-with-opencl.patch | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/gnu/packages/patches/hwloc-add-with-opencl.patch b/gnu/packages/patches/hwloc-add-with-opencl.patch deleted file mode 100644 index 03a16d34d0e..00000000000 --- a/gnu/packages/patches/hwloc-add-with-opencl.patch +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | From f30cc463a948260088b496c3609dd91c83c0ce1b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Brice Goglin <Brice.Goglin@inria.fr> | ||
| 3 | Date: Mon, 16 Feb 2026 15:00:53 +0100 | ||
| 4 | Subject: [PATCH] configure: add --with-opencl=<dir> | ||
| 5 | |||
| 6 | For non-ROCm non-CUDA installs. | ||
| 7 | |||
| 8 | Thanks to Romain Garbage for the suggestion. | ||
| 9 | |||
| 10 | Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> | ||
| 11 | (cherry picked from commit 462eff5a4541dfcb3db15034490c796c4f1d8ec6) | ||
| 12 | --- | ||
| 13 | config/hwloc.m4 | 18 +++++++++++++++--- | ||
| 14 | config/hwloc_internal.m4 | 13 ++++++++++++- | ||
| 15 | 2 files changed, 27 insertions(+), 4 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/config/hwloc.m4 b/config/hwloc.m4 | ||
| 18 | index e0057e8e5..4a26a7ec0 100644 | ||
| 19 | --- a/config/hwloc.m4 | ||
| 20 | +++ b/config/hwloc.m4 | ||
| 21 | @@ -1,7 +1,7 @@ | ||
| 22 | dnl -*- Autoconf -*- | ||
| 23 | dnl | ||
| 24 | dnl SPDX-License-Identifier: BSD-3-Clause | ||
| 25 | -dnl Copyright © 2009-2025 Inria. All rights reserved. | ||
| 26 | +dnl Copyright © 2009-2026 Inria. All rights reserved. | ||
| 27 | dnl Copyright © 2009-2012, 2015-2017, 2020, 2023, 2025 Université Bordeaux | ||
| 28 | dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana | ||
| 29 | dnl University Research and Technology | ||
| 30 | @@ -1365,6 +1365,18 @@ return rsmi_init(0); | ||
| 31 | echo "**** OpenCL configuration" | ||
| 32 | |||
| 33 | hwloc_opencl_happy=yes | ||
| 34 | + | ||
| 35 | + if test "x$with_opencl" != x -a "x$with_opencl" != xyes; then | ||
| 36 | + opencl_dir=$with_opencl | ||
| 37 | + AC_MSG_NOTICE([using custom OpenCL install path $opencl_dir ...]) | ||
| 38 | + else | ||
| 39 | + AC_MSG_NOTICE([assuming OpenCL is installed in standard directories ...]) | ||
| 40 | + fi | ||
| 41 | + if test "x$opencl_dir" != x; then | ||
| 42 | + HWLOC_OPENCL_CPPFLAGS="-I$opencl_dir/include/" | ||
| 43 | + HWLOC_OPENCL_LDFLAGS="-L$opencl_dir/lib/" | ||
| 44 | + fi | ||
| 45 | + | ||
| 46 | case ${target} in | ||
| 47 | *-*-darwin*) | ||
| 48 | # On Darwin, only use the OpenCL framework | ||
| 49 | @@ -1387,8 +1399,8 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL); | ||
| 50 | ;; | ||
| 51 | *) | ||
| 52 | # On Others, look for OpenCL at normal locations | ||
| 53 | - HWLOC_OPENCL_CPPFLAGS="$HWLOC_CUDA_COMMON_CPPFLAGS" | ||
| 54 | - HWLOC_OPENCL_LDFLAGS="$HWLOC_CUDA_COMMON_LDFLAGS" | ||
| 55 | + HWLOC_OPENCL_CPPFLAGS="$HWLOC_OPENCL_CPPFLAGS $HWLOC_CUDA_COMMON_CPPFLAGS" | ||
| 56 | + HWLOC_OPENCL_LDFLAGS="$HWLOC_OPENCL_LDFLAGS $HWLOC_CUDA_COMMON_LDFLAGS" | ||
| 57 | if test "x$rocm_dir" != x; then | ||
| 58 | if test -d "$rocm_dir/include/CL"; then | ||
| 59 | HWLOC_OPENCL_CPPFLAGS="$HWLOC_OPENCL_CPPFLAGS -I$rocm_dir/include/" | ||
| 60 | diff --git a/config/hwloc_internal.m4 b/config/hwloc_internal.m4 | ||
| 61 | index da6505e91..1135a245f 100644 | ||
| 62 | --- a/config/hwloc_internal.m4 | ||
| 63 | +++ b/config/hwloc_internal.m4 | ||
| 64 | @@ -1,7 +1,7 @@ | ||
| 65 | dnl -*- Autoconf -*- | ||
| 66 | dnl | ||
| 67 | dnl SPDX-License-Identifier: BSD-3-Clause | ||
| 68 | -dnl Copyright © 2010-2025 Inria. All rights reserved. | ||
| 69 | +dnl Copyright © 2010-2026 Inria. All rights reserved. | ||
| 70 | dnl Copyright © 2009, 2011 Université Bordeaux | ||
| 71 | dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana | ||
| 72 | dnl University Research and Technology | ||
| 73 | @@ -147,6 +147,17 @@ AC_DEFUN([HWLOC_DEFINE_ARGS],[ | ||
| 74 | [AC_MSG_ERROR([--with-amdgpu=<dir> missing the installation directory])])] | ||
| 75 | ) | ||
| 76 | |||
| 77 | + # OpenCL | ||
| 78 | + AC_ARG_ENABLE([opencl], | ||
| 79 | + AS_HELP_STRING([--disable-opencl], | ||
| 80 | + [Disable the OpenCL device discovery])) | ||
| 81 | + AC_ARG_WITH([opencl], | ||
| 82 | + AS_HELP_STRING([--with-opencl=<dir>], | ||
| 83 | + [Specify the OpenCL installation directory]), | ||
| 84 | + [AS_IF([test "x$withval" = xyes -o "x$withval" = x], | ||
| 85 | + [AC_MSG_ERROR([--with-opencl=<dir> missing the installation directory])])] | ||
| 86 | + ) | ||
| 87 | + | ||
| 88 | # LevelZero | ||
| 89 | AC_ARG_ENABLE([levelzero], | ||
| 90 | AS_HELP_STRING([--disable-levelzero], | ||
