diff options
Diffstat (limited to 'gnu/packages/opencl.scm')
-rw-r--r-- | gnu/packages/opencl.scm | 150 |
1 files changed, 61 insertions, 89 deletions
diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm index e95d19db47..2d5ccf0105 100644 --- a/gnu/packages/opencl.scm +++ b/gnu/packages/opencl.scm @@ -23,6 +23,7 @@ #:use-module (guix build-system copy) #:use-module (guix build-system python) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -48,10 +49,13 @@ ;; tests that require such devices are all disabled. ;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html +;; If you update either of opencl-headers, opencl-clhpp or opencl-icd-loader +;; note that they are released together (lockstep) and must be updated +;; together. (define-public opencl-headers (package (name "opencl-headers") - (version "2020.12.18") + (version "2021.06.30") (source (origin (method git-fetch) @@ -60,11 +64,9 @@ (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1zslxfzvbb1mrzmsik4pjzj88ds8y3p94ry5nnrnkhv6qm4n4lw9")))) - (build-system copy-build-system) - (arguments - '(#:install-plan - '(("CL" "include/")))) ; TODO: add phase for tests + (base32 "1nrvx0x9r1nz1qpmzbgffnn9h9pn2fwcxsksf101bkpmqziq5lii")))) + (build-system cmake-build-system) + (arguments `(#:tests? #f)) ; Not enabled during build. (synopsis "The Khronos OpenCL headers") (description "This package provides the C headers by Khronos for OpenCL programming.") @@ -94,7 +96,7 @@ (define-public opencl-clhpp (package (name "opencl-clhpp") - (version "2.0.10") + (version "2.0.15") (source (origin (method git-fetch) @@ -102,21 +104,14 @@ (url "https://github.com/KhronosGroup/OpenCL-CLHPP") (commit (string-append "v" version)))) (sha256 - (base32 "0h5kpg5cl8wzfnqmv6i26aig2apv06ffm9p3rh35938n9r8rladm")) + (base32 "1wycdbvwbdn7lqdd3sby8471qg2zdisr70218ava6cfvxdsqcp83")) (file-name (git-file-name name version)))) (native-inputs `(("python" ,python-wrapper))) (propagated-inputs `(("opencl-headers" ,opencl-headers))) (arguments - `(#:configure-flags - (let ((out (assoc-ref %outputs "out"))) - (list - "-DBUILD_EXAMPLES=OFF" - "-DBUILD_TESTS=OFF" - (string-append "-DCMAKE_INSTALL_PREFIX=" - (assoc-ref %outputs "out") - "/include"))) + `(#:configure-flags (list "-DBUILD_EXAMPLES=OFF" "-DBUILD_TESTS=OFF") ;; The regression tests require a lot more dependencies. #:tests? #f)) (build-system cmake-build-system) @@ -126,47 +121,50 @@ "This package provides the @dfn{host API} C++ headers for OpenCL.") (license license:expat))) -(define-public ocl-icd +(define-public opencl-icd-loader (package - (name "ocl-icd") - (version "2.2.12") + (name "opencl-icd-loader") + (version "2021.06.30") (source (origin - (method url-fetch) - (uri (string-append - "https://forge.imag.fr/frs/download.php/836/ocl-icd-" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/KhronosGroup/OpenCL-ICD-Loader.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1x2dr8p4dkfds56r38av360i3nv1y3326jmshxvjngaf6mlg6rbn")) - (modules '((guix build utils))) - (snippet - '(delete-file-recursively "khronos-headers")))) - (native-inputs - `(("opencl-headers" ,opencl-headers) - ("ruby" ,ruby))) - (inputs - `(("libgcrypt" ,libgcrypt))) - (build-system gnu-build-system) - (arguments - '(#:configure-flags '("DEBUG_OCL_ICD=1"))) + "007ws357n1ijrxal1bf9lwy68p0dz1sm9cfcfnnz5f88iwc9xd6m")))) + (build-system cmake-build-system) + (arguments `(#:tests? #f)) ; Tests need stub loader setup. (native-search-paths (list (search-path-specification - (variable "OPENCL_VENDOR_PATH") + (variable "OCL_ICD_VENDORS") (files '("etc/OpenCL/vendors"))))) - (search-paths native-search-paths) - (home-page "https://forge.imag.fr/projects/ocl-icd/") - (synopsis "OpenCL loader for Installable Client Drivers (ICDs)") + (home-page "https://github.com/KhronosGroup/OpenCL-ICD-Loader") + (inputs `(("opencl-headers" ,opencl-headers))) + (synopsis "OpenCL Installable Client Driver") (description - "OpenCL implementations are provided as ICDs (Installable Client -Drivers). An OpenCL program can use several ICDs thanks to the use of an ICD -Loader as provided by this package.") - (license license:bsd-2))) + "OpenCL defines an Installable Client Driver (ICD) mechanism to allow +developers to build applications against an Installable Client Driver loader +(ICD loader) rather than linking their applications against a specific OpenCL +implementation. The ICD Loader is responsible for: + +@itemize +@item Exporting OpenCL API entry points +@item Enumerating OpenCL implementations +@item Forwarding OpenCL API calls to the correct implementation +@end itemize + +This package contains the Khronos official OpenCL ICD Loader.") + (license license:asl2.0))) + +(define-public ocl-icd + (deprecated-package "ocl-icd" opencl-icd-loader)) (define-public clinfo (package (name "clinfo") - (version "2.2.18.04.06") + (version "3.0.21.02.21") (source (origin (method git-fetch) @@ -175,26 +173,17 @@ Loader as provided by this package.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0y2q0lz5yzxy970b7w7340vp4fl25vndahsyvvrywcrn51ipgplx")))) + (base32 "1sfxp6ai83i0vwdg7b05h0k07q6873q1z1avnyksj5zmzdnxya6j")))) (build-system gnu-build-system) (native-inputs `(("opencl-headers" ,opencl-headers))) (inputs - `(("ocl-icd" ,ocl-icd))) + `(("opencl-icd-loader" ,opencl-icd-loader))) (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda _ - (let ((cores (number->string (parallel-job-count)))) - (setenv "CC" "gcc") - (invoke "make" "-j" cores)))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (invoke "make" "install" (string-append - "PREFIX=" - (assoc-ref outputs "out")))))) + `(#:make-flags + (list ,(string-append "CC=" (cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases (modify-phases %standard-phases (delete 'configure)) #:tests? #f)) (home-page "https://github.com/Oblomov/clinfo") (synopsis "Print information about OpenCL platforms and devices") @@ -239,7 +228,7 @@ the system.") ("libxext" ,libxext) ("mesa-utils" ,mesa-utils) ("ncurses" ,ncurses) - ("ocl-icd" ,ocl-icd) + ("opencl-icd-loader" ,opencl-icd-loader) ("opencl-headers" ,opencl-headers) ("xextproto" ,xextproto) ("zlib" ,zlib))) @@ -306,7 +295,7 @@ back-end for the LLVM compiler framework.") `(("clang" ,clang) ("hwloc" ,hwloc-2 "lib") ("llvm" ,llvm) - ("ocl-icd" ,ocl-icd))) + ("opencl-icd-loader" ,opencl-icd-loader))) (arguments `(#:configure-flags (list "-DENABLE_ICD=ON" @@ -338,20 +327,18 @@ pocl.") (define-public python-pytools (package (name "python-pytools") - (version "2020.4") + (version "2021.2.7") (source (origin (method url-fetch) (uri (pypi-uri "pytools" version)) (sha256 - (base32 "0q7439iy365a874ckpavx6h1mhnnngfy8nl7xj5grdd127zkknrp")))) + (base32 "1yyr4k6sqx859gjhc02633l2vxwdnj6m2f5blmf7dgq0gzzgcf05")))) (build-system python-build-system) + (arguments `(#:tests? #f)) ; Tests depend on packages not present in Guix. (propagated-inputs `(("python-appdirs" ,python-appdirs) - ("python-decorator" ,python-decorator) - ("python-numpy" ,python-numpy) - ("python-six" ,python-six) - ("python-mpi4py" ,python-mpi4py))) + ("python-numpy" ,python-numpy))) (home-page "https://pypi.org/project/pytools/") (synopsis "Assorted tools for Python") (description @@ -377,44 +364,29 @@ A lexer, @code{pytools.lex}. (define-public python-pyopencl (package (name "python-pyopencl") - (version "2019.1.1") + (version "2021.2.6") (source (origin - ;; The tarball on PyPI lacks test programs such as - ;; 'pygpu_language_opencl.cpp' so fetch it from Git. - ;; XXX: The server at git.tiker.net is unreliable. (method git-fetch) (uri (git-reference - (url "http://git.tiker.net/trees/pyopencl.git") + (url "https://github.com/inducer/pyopencl.git") (commit (string-append "v" version)) (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 - "12q0rs8yla571vcfpsh0mfrjbdiayv0hi8r1rq0f178m3i3qjz80")))) + "1s2cls7avxvf753zzpx422ikslaxdnm8rz58zg7mal15yak0wv2x")))) (build-system python-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'build 'set-home - (lambda _ - ;; Some of the Python build scripts expect 'HOME' to be - ;; set. - (setenv "HOME" (getcwd)) - #t))) - - ;; Tests in 'compyte/ndarray/setup_opencl.py' appear to rely on - ;; 'nvcc', which is not an option. - #:tests? #f)) + `(#:tests? #f)) ; Tests cannot find pygpu_language_opencl.cpp (inputs - `(("opencl-headers" ,opencl-headers-1.2) ;POCL only supports OpenCL 1.2 + `(("opencl-headers" ,opencl-headers) ("pybind11" ,pybind11) - ("ocl-icd" ,ocl-icd))) ;libOpenCL + ("opencl-icd-loader" ,opencl-icd-loader))) ;libOpenCL (propagated-inputs `(("python-appdirs" ,python-appdirs) - ("python-decorator" ,python-decorator) ("python-numpy" ,python-numpy) ("python-pytools" ,python-pytools) - ("python-six" ,python-six) ("python-mako" ,python-mako))) (home-page "http://mathema.tician.de/software/pyopencl") (synopsis "Python wrapper for OpenCL") |