unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: 55948@debbugs.gnu.org
Subject: [bug#55948] [PATCH 0/2] gnu: Update rocm to 5.1.3.
Date: Mon, 13 Jun 2022 17:23:28 +0000	[thread overview]
Message-ID: <ForlI9pwyimRYtR94XmPipgXx6bzs-Y1jQCExNj9rQaTxBedIjgvrK4nW2nEzO2YbLkDH79uRpzxmlC128hf7Tcy3Jnf7U6SNUAjRg36Xwk=@protonmail.com> (raw)

Hi Guixers,

Incoming are two patches to update the rocm packages (AMD's OpenCL stuff) to the latest version. With this I can use OpenCL in Darktable with my current gen GPU (note: I'm not on linux-libre, which likely impacts what cards can be used).

I tested that everything builds and darktable-cltest reports successful output, as well as rocminfo. E.g. running

./pre-inst-env guix shell rocm-opencl-runtime rocm-device-libs opencl-icd-loader darktable -- darktable-cltest

A few quick notes on these patches. Most of this was discussed on IRC recently, but for the record:

1. llvm-for-rocm: The first patch updates this to use llvm-14, which is what the current rocm version is based on.

2. rocm: All of the packages are updated in one commit as they share a version number and there some interdependencies.

3. rocclr: This is no longer meant as a standalone package: cmake will output a warning and there is no install to be done. It is meant to be included in packages that use it. I've made a plain origin for the rocclr source that is needed (see rocm-opencl-runtime that uses it) and renamed the old version to rocclr-4 since that will still build/install in case it is of use.

This is the commit that changed the build behavior, active since v4.5 at least: https://github.com/ROCm-Developer-Tools/ROCclr/commit/df1449608e92c9e42b4ce5799e6eb51934ae7d4a

4. Relatedly, both Arch and Gentoo build rocclr before building rocm-opencl-runtime, but this doesn't seem to do anything. Unfortunately the rocm readmes are unclear/not up to date on exactly what is needed. From my testing, just setting a configure flag to point to the rocclr source is all that is needed.

The Arch and Gentoo recipes are here:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=rocm-opencl-runtime

https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.0.2.ebuild

We can do the same thing by adding in this phase for rocm-opencl-runtime. I did not see any change in the final output and everything (with Darktable) seemed fine without it. It will take a little longer to build as it does build rocclr explicitly. Anyway, in case it is of use to anyone, here is the code

          (add-before 'configure 'configure-rocclr
            (lambda* (#:key inputs #:allow-other-keys)
              (invoke "cmake" (string-append "-DAMD_OPENCL_PATH="
                                             #$(package-source this-package))
                      "-B build-rocclr" "-S" #$rocclr-src)
              (invoke "make" "-C" "build-rocclr")))

Okay, that's it! Overall is mostly updating hashes and some patches, other than the rocclr notes above. I hope I got the (long) commit message correct on the second patch. The changes work well for me locally.

Thanks!
John




             reply	other threads:[~2022-06-13 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 17:23 John Kehayias via Guix-patches via [this message]
2022-06-13 17:25 ` [bug#55948] [PATCH 1/2] gnu: Update llvm-for-rocm to 5.1.3 John Kehayias via Guix-patches via
2022-06-13 17:26 ` [bug#55948] [PATCH 2/2] gnu: rocm: Update " John Kehayias via Guix-patches via
2022-06-16 11:35 ` bug#55948: [PATCH 0/2] gnu: Update rocm " Ludovic Courtès
2022-06-16 12:04   ` [bug#55948] " Lars-Dominik Braun
2022-06-16 12:17     ` Ludovic Courtès
2022-06-16 15:43       ` John Kehayias via Guix-patches via
2022-06-28 11:22         ` Lars-Dominik Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ForlI9pwyimRYtR94XmPipgXx6bzs-Y1jQCExNj9rQaTxBedIjgvrK4nW2nEzO2YbLkDH79uRpzxmlC128hf7Tcy3Jnf7U6SNUAjRg36Xwk=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=55948@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).