unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 92530b5d83352e03490198156272bbef6738a8c0 5977 bytes (raw)
name: gnu/packages/rocm.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
 
;;;
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;;
;;; This program is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages rocm)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (guix git-download)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages)
  #:use-module (gnu packages elf)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages llvm)
  #:use-module (gnu packages opencl)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages vim))

;; The components are tightly integrated and can only be upgraded as a unit. If
;; you want to upgrade ROCm, bump this version number and update hashes below.
(define %rocm-version "4.3.0")

(define-public rocm-cmake
  (package
    (name "rocm-cmake")
    (version %rocm-version)
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/RadeonOpenCompute/rocm-cmake.git")
                    (commit (string-append "rocm-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0sic2zxmzl2pb2865vvq55mbpcr8pby8v19pjdlm08pypqw5h6h6"))))
    (build-system cmake-build-system)
    (arguments `(#:tests? #f)) ; Tests try to use git commit
    (native-inputs `(("git" ,git)))
    (home-page "https://github.com/RadeonOpenCompute/rocm-cmake")
    (synopsis "ROCm cmake modules")
    (description "ROCm cmake modules provides cmake modules for common build
tasks needed for the ROCM software stack.")
    (license license:ncsa)))

(define-public llvm-for-rocm
  (hidden-package
   (package
     ;; Actually based on LLVM 13 as of v4.3, but llvm-12 works just fine.
     (inherit llvm-12)
     (name "llvm-for-rocm")
     (version %rocm-version)
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/RadeonOpenCompute/llvm-project.git")
                     (commit (string-append "rocm-" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
                 "0p75nr1qpmy6crymdax5hm40wkimman4lnglz4x5cnbiqindya7s"))
               (patches
                (search-patches "llvm-roc-4.2.0-add_Object.patch"
                                "llvm-roc-3.0.0-add_libraries.patch"
								"llvm-roc-4.0.0-remove-isystem-usr-include.patch"))))
     (arguments
      (substitute-keyword-arguments (package-arguments llvm-12)
        ((#:phases phases '%standard-phases)
         `(modify-phases ,phases
            (add-after 'unpack 'chdir
              (lambda _
                (chdir "llvm")))))
        ((#:configure-flags flags)
         ''("-DLLVM_ENABLE_PROJECTS=llvm;clang;lld"
            "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86"
            "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
            "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
            "-DBUILD_SHARED_LIBS:BOOL=TRUE"
            "-DLLVM_VERSION_SUFFIX=")))))))

(define-public rocm-device-libs
  (package
    (name "rocm-device-libs")
    (version %rocm-version)
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git")
                    (commit (string-append "rocm-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1f8xsylfajpxqjk6ayjnrry53y8b0a6lh9d72pd41nffxfyzvw3w"))))
    (build-system cmake-build-system)
    (arguments
     `(#:configure-flags
       (list "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
             "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE")))
    (inputs `(("llvm" ,llvm-for-rocm)))
    (home-page "https://github.com/RadeonOpenCompute/ROCm-Device-Libs")
    (synopsis "ROCm Device libraries")
    (description "AMD-specific device-side language runtime libraries, namely
oclc, ocml, ockl, opencl, hip and hc.")
    (license license:ncsa)))

(define-public rocm-comgr
  (package
    (name "rocm-comgr")
    (version %rocm-version)
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git")
                    (commit (string-append "rocm-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0bakbm7shr0l67lph44b5cnc9psd6rivg1mp79qizaawkn380x60"))
              (patches
               (search-patches "rocm-comgr-3.1.0-dependencies.patch"))))
    (build-system cmake-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda* (#:key inputs native-inputs #:allow-other-keys)
             (chdir "lib/comgr")
             #t)))))
    (inputs
     `(("rocm-device-libs" ,rocm-device-libs)
       ("llvm" ,llvm-for-rocm)
       ("lld" ,lld)))
    (home-page "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport")
    (synopsis "ROCm Code Object Manager")
    (description "The Comgr library provides APIs for compiling and inspecting
AMDGPU code objects.")
    (license license:ncsa)))

debug log:

solving 92530b5d83 ...
found 92530b5d83 in https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
found 14eaed9007 in https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
found 473fbe21d0 in https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
found b04eb8050e in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 b04eb8050e72d4c9090728d9050b47dfecdf7a90	gnu/packages/rocm.scm

applying [1/3] https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index b04eb8050e..473fbe21d0 100644


applying [2/3] https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index 473fbe21d0..14eaed9007 100644


applying [3/3] https://yhetil.org/guix-patches/YQzgijKaVsWcCvQv@noor.fritz.box/
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index 14eaed9007..92530b5d83 100644

Checking patch gnu/packages/rocm.scm...
Applied patch gnu/packages/rocm.scm cleanly.
Checking patch gnu/packages/rocm.scm...
Applied patch gnu/packages/rocm.scm cleanly.
Checking patch gnu/packages/rocm.scm...
Applied patch gnu/packages/rocm.scm cleanly.

index at:
100644 92530b5d83352e03490198156272bbef6738a8c0	gnu/packages/rocm.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).