projects/guix·blob python-team · refs

94 lines · 3.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2023, 2024 Andy Tai <[email protected]>
3;;; Copyright © 2025, 2026 Cayetano Santos <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages sycl)
21 #:use-module (guix build-system cmake)
22 #:use-module (guix gexp)
23 #:use-module (guix git-download)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages boost)
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages llvm)
30 #:use-module (gnu packages libffi)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages rocm)
34 #:use-module (gnu packages vulkan))
35
36;; This file adds SYCL implementation related packages. Due to the fact that
37;; SYCL devices like GPU are not available during build (store environment),
38;; tests that require such devices are all disabled.
39;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html
40
41(define-public adaptivecpp
42 (package
43 (name "adaptivecpp")
44 (version "25.10.0")
45 (source (origin
46 (method git-fetch)
47 (uri (git-reference
48 (url "https://github.com/AdaptiveCpp/AdaptiveCpp/")
49 (commit (string-append "v" version))))
50 (file-name (git-file-name name version))
51 (sha256
52 (base32
53 "0sv5f366ybzpsdpka0fb578pb4q3537h6hkn825m0kbssh32wxk7"))))
54 (build-system cmake-build-system)
55 ;; Sync with llvm version used by llvm-rocm.
56 (native-inputs (list clang-20 lld-20 python-minimal rocm-hipcc))
57 (inputs
58 (list boost
59 libffi
60 numactl
61 rocm-opencl-runtime
62 rocm-device-libs
63 rocm-hip-runtime
64 rocr-runtime
65 spirv-headers
66 spirv-tools))
67 (arguments
68 (list
69 #:configure-flags
70 #~(list
71 (string-append "-DCMAKE_EXE_LINKER_FLAGS=" "-Wl,-rpath="
72 #$output "/lib,-rpath="
73 #$output "/lib/hipSYCL/llvm-to-backend")
74 (string-append
75 "-DACPP_LLD_PATH=" (search-input-file %build-inputs "/bin/ld.lld"))
76 "-DWITH_ROCM_BACKEND=ON"
77 (string-append
78 "-DROCM_PATH=" #$(this-package-input "rocm-device-libs"))
79 (string-append
80 "-DROCM_DEVICE_LIBS_PATH=" #$(this-package-input "rocm-device-libs")
81 "/amdgcn/bitcode"))
82 #:tests? #f)) ; no tests
83 (home-page "https://adaptivecpp.github.io/")
84 (synopsis
85 "Compiler for multiple programming models for CPUs and GPUs")
86 (description
87 "AdaptiveCpp is a community-driven compiler for C++-based heterogeneous
88programming models. It implements SYCL, C++ standard parallelism, and
89HIP/CUDA, targeting CPUs and GPUs from all major vendors. AdaptiveCpp lets
90applications adapt themselves to all the hardware found in the system. This
91includes use cases where a single binary needs to be able to target all
92supported hardware, or utilize hardware from different vendors
93simultaneously.")
94 (license license:bsd-2)))