1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00
Files
guix/gnu/packages/rocm-tools.scm
Cayetano Santos 28c28d2ec8 gnu: rocprofiler: Move to rocm and switch sources.
* gnu/packages/rocm-tools.scm (rocprofiler): Move from here ...
* gnu/packages/rocm.scm (rocprofiler): ... to here.
[home-page]: Update.
[source]: Update.
[arguments]<#:configure-flags>: Complete.
<#:phases>: Add ’chdir; shift "after ’unpack" to "after ’chdir".
[native-inputs]: Add ’perfetto.

Merges guix/guix!6448

Change-Id: I57e83327c73ecb05db18f509a7c1f88f04014ed0
2026-02-20 08:44:52 +01:00

95 lines
3.6 KiB
Scheme

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Advanced Micro Devices, Inc.
;;; Copyright © 2026 David Elsing <david.elsing@posteo.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-tools)
#:use-module (guix build-system cmake)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages check)
#:use-module (gnu packages elf)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages rocm)
#:use-module (gnu packages xdisorg))
;; The components are tightly integrated and can only be upgraded as a unit. If
;; you want to upgrade ROCm, bump this version number and the version number in
;; - rocm.scm
;; - rocm-libs.scm
;; - gdb.scm
;; and update the hashes of the affected packages.
(define %rocm-version "7.1.1")
(define-public hipify
(package
(name "hipify")
(version %rocm-version)
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ROCm/hipify")
(commit (string-append "rocm-" version))))
(file-name (git-file-name name (string-append "rocm-" version)))
(sha256
(base32 "153nzm292sp9m52dkjss5bf3971p5nwi38dw49pnlc1g00f4bc9m"))))
(build-system cmake-build-system)
(arguments
(list
#:build-type "Release"
#:tests? #f ; requires CUDA
#:configure-flags
#~'("-DCMAKE_CXX_COMPILER=clang++")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'remove-generated
(lambda _
(delete-file "bin/hipify-perl")))
(add-before 'configure 'prepare-cmake
(lambda _
(substitute* "CMakeLists.txt"
(("set.CMAKE_CXX_COMPILER.*") "")
(("set.CMAKE_C_COMPILER.*") ""))))
(add-after 'build 'build-hipify-perl
(lambda _
(invoke "./hipify-clang" "--perl" "--o-hipify-perl-dir=../source/bin")))
(add-after 'install 'chmod
(lambda _
(for-each (lambda (file)
(chmod file #o555))
(find-files (string-append #$output "/bin")))))
(add-after 'install 'patch-shebang
(lambda _
(patch-shebang (string-append #$output "/bin/hipify-perl")))))))
(inputs (list clang-rocm perl))
(synopsis "HIPIFY: Convert CUDA to HIP code")
(description
"HIPIFY is a set of tools that you can use to automatically
translate CUDA source code into portable HIP C++.")
(home-page "https://github.com/ROCm/HIPIFY")
(license license:ncsa)))