1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-06-28 01:44:04 +02:00

gnu: rocm-hip-runtime: Fix incorrect 'HIP_PATH' location for `hipconfig'.

* gnu/packages/llvm.scm (rocm-hipcc): Adjust wrapper so 'HIP_PATH' can be
overriden.
[phases]: Adjust 'wrap-programs' phase for making wrapped binaries respect
HIP_PATH environment variable.

* gnu/packages/rocm.scm (rocm-hip-runtime): Re-wrap programs taken from
`rocm-hipcc' so their paths point to this package output.
[phases]: Add 'wrap-programs' phase to force 'HIP_PATH' to point to the
package output.

Fixes: #6821

Change-Id: I877b1f3b3dda1ebc00caf5ef1c729914efa6de94
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #8181
This commit is contained in:
Sergio Pastor Pérez
2026-04-27 11:11:40 +02:00
committed by Ludovic Courtès
parent a9b47b02c6
commit 21d2cd9759
2 changed files with 16 additions and 2 deletions
+4 -1
View File
@@ -1621,7 +1621,10 @@ AMDGPU code objects.")
;; #$rocm-hip-runtime.
;;(list "HIP_ROCCLR_HOME" '= (list #$rocm-hip-runtime))
(list "HIP_PATH" '= (list #$output))
;; HACK: allow `rocm-hip-runtime' to wrap this program
;; with its own `HIP_PATH'.
(list "HIP_PATH" '= (list (string-append "${HIP_PATH:-" #$output "}")))
(list "HIP_CLANG_PATH"
'=
(list (string-append
+12 -1
View File
@@ -225,7 +225,18 @@ and in-process/in-memory compilation.")
(("LLVM_DIR=\"\\$4\"")
"LLVM_DIR=\"$4\"; CLANG_DIR=\"$5\";")
(("\\$LLVM_DIR/bin/clang")
(string-append "$CLANG_DIR/bin/clang"))))))))
(string-append "$CLANG_DIR/bin/clang")))))
;; Re-wrap programs taken from `rocm-hipcc' so their paths point to
;; this package output.
(add-after 'install 'wrap-programs
(lambda _
(let ((output-bindir (string-append #$output "/bin")))
(for-each
(lambda (file)
(wrap-program (string-append output-bindir "/" file)
`("HIP_PATH" = ,(list #$output))
`("PATH" suffix ,(list output-bindir))))
'("hipcc" "hipconfig"))))))))
(inputs
(list glew
mesa