From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: ROCm core and OpenCL
Date: Tue, 04 Aug 2020 19:16:16 +0200 [thread overview]
Message-ID: <20200804171616.lSH6J-j_-RmZhNox9V2qvVMuNv5LU82hRMuWqe4LPj8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21153@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 3893 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages rocm
https://github.com/void-linux/void-packages/pull/21153
New packages: ROCm core and OpenCL
This PR includes several packages designed to bring the OpenCL portion of the AMD ROCm ecosystem to Void. It addresses Issue #19507. There are many other packages that AMD provides for GPGPU computing, but these can be added piecemeal as users demand.
The packages are currently only for `x86_64*`. While at least some of the packages will compile on other 64-bit architectures, I have no hardware to test. They are certainly not suitable for 32-bit architectures; some internal data structures rely on `uint64_t` values that are cast to pointers. At a
minimum, a thorough audit would be necessary to ensure that these casts are safe (e.g., that the values stored were only ever upcast from 32-bit pointers). More extensive work may be necessary to support 32-bit architectures, probably without significant benefit.
The packages successfully identify a Radeon RX 580 on an `x86_64` installation using both `clinfo` and `rocminfo` as provided. Furthermore, a version of `pyopencl` linked against these ROCm packages successfully runs a simple program that validates arithmetic on GPU-bound arrays.
There are caveats with this set of packages, almost all of which revolve around the incompatibilities between the Void-provided `ocl-icd` and the [Khronos OpenCL ICD loader](https://github.com/KhronosGroup/OpenCL-ID-Loader) required by (and built into) `rocm-opencl-runtime`.
1. All packages install into `/opt/rocm`. This keeps the environment closer to that officially sanctioned by AMD and helps avoid conflicts between other packages and those provided here. (For example, `clinfo` and the ICD loader itself.) Eventually, we may be able to move the files into `/usr`.
2. The Khronos OpenCL ICD loader built into `rocm-opencl-runtime` is an outdated, pre-release commit. If AMD can update its sources to use the release version of that loader (which has a backward-incompatible API change), we may be able to make ROCm compatible with `ocl-icd` or replace `ocl-icd` with the official Khronos loader.
3. In the meantime, to avoid `shlibs` conflicts, the OpenCL ICD loader is installed as `/opt/rocm/lib/libOpenCL-ROCm.so` (and an appropriately versioned shared library), which means that programs wishing to use the ROCm OpenCL must explicitly link against this library instead of the generic `libOpenCL.so`.
4. I do **not** recommend making any Void packages link against this specific library, because it will make those packages ROCm-only. For the time being, ROCm is intended for end-users to specifically link against. Linking Void packages against ROCm would requires the ICD loader used by ROCm be compatible with `ocl-icd`, or `ocl-icd` be replaced by the Khronos loader. However, because the Khronos loader changed its API for the release version, such a change is not yet appropriate.
Hopefully, if AMD updates its dependence on the Khronos ICD loader, we can resolve some of these caveats in the future and make ROCm a more natural Void component. For now, these packages are useful for those who need an AMD OpenCL solution and would rather custom-link software against the AMD ICD loader than hack the `amdgpu-pro` driver into an ICD compatible with `ocl-icd`.
Some patches were made to relocate some files in `/opt/rocm` and make everyting build on x86_64-musl`. Where appropriate, these patches will be pushed upstream to clean up the distribution and packaging.
Update: I pushed some new commits to update license information that triggerd an `xlint` failure. I've also disabled CI builds because they will time out on `rocm-llvm`.
A patch file from https://github.com/void-linux/void-packages/pull/21153.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rocm-21153.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]
next prev parent reply other threads:[~2020-08-04 17:16 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 13:34 [PR PATCH] " ahesford
2020-04-19 15:24 ` [PR PATCH] [Updated] " ahesford
2020-04-19 15:57 ` ahesford
2020-04-19 19:02 ` ahesford
2020-04-20 2:02 ` ahesford
2020-04-28 14:00 ` ahesford
2020-04-28 15:14 ` ahesford
2020-04-28 17:34 ` ahesford
2020-04-28 17:34 ` ahesford
2020-04-28 17:38 ` ahesford
2020-04-28 18:09 ` ahesford
2020-04-28 18:44 ` [PR PATCH] [Updated] " ahesford
2020-04-28 19:59 ` ahesford
2020-04-30 19:05 ` ahesford
2020-04-30 19:12 ` ahesford
2020-04-30 19:22 ` ahesford
2020-04-30 19:32 ` ahesford
2020-04-30 19:35 ` ahesford
2020-04-30 19:38 ` ahesford
2020-05-01 4:57 ` lemmi
2020-05-01 5:10 ` ahesford
2020-05-01 5:12 ` ahesford
2020-05-01 14:04 ` [PR PATCH] [Updated] " ahesford
2020-05-01 19:36 ` ahesford
2020-05-02 1:34 ` ahesford
2020-05-02 3:29 ` ahesford
2020-05-05 14:24 ` ahesford
2020-05-05 14:26 ` ahesford
2020-05-07 14:18 ` ahesford
2020-05-07 16:01 ` ahesford
2020-05-08 14:40 ` ahesford
2020-05-11 18:02 ` ericonr
2020-05-11 18:07 ` ahesford
2020-05-11 18:07 ` ahesford
2020-05-11 18:52 ` [PR PATCH] [Updated] " ahesford
2020-05-11 20:03 ` ahesford
2020-05-14 18:04 ` FiCacador
2020-05-14 18:04 ` FiCacador
2020-05-14 19:13 ` ahesford
2020-05-14 19:14 ` ahesford
2020-05-14 22:51 ` FiCacador
2020-05-15 0:07 ` ahesford
2020-05-15 1:30 ` fosslinux
2020-05-15 3:31 ` FiCacador
2020-05-15 3:32 ` FiCacador
2020-05-15 6:54 ` fosslinux
2020-08-04 17:13 ` [PR PATCH] [Updated] " ahesford
2020-08-04 17:13 ` ahesford
2020-08-04 17:16 ` [PR PATCH] [Closed]: " ahesford
2020-08-04 17:16 ` ahesford [this message]
2020-08-04 17:19 ` ahesford
2020-08-04 17:24 ` [PR PATCH] [Updated] " ahesford
2020-08-18 18:36 ` aurieh
2020-08-18 18:38 ` aurieh
2020-08-18 18:39 ` aurieh
2020-08-18 19:46 ` ahesford
2020-08-20 18:50 ` [PR PATCH] [Updated] " ahesford
2020-12-21 7:32 ` fosslinux
2020-12-21 11:58 ` ahesford
2021-02-15 5:19 ` ahesford
2021-02-15 5:19 ` [PR PATCH] [Closed]: " ahesford
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200804171616.lSH6J-j_-RmZhNox9V2qvVMuNv5LU82hRMuWqe4LPj8@z \
--to=ahesford@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/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.
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 NNTP newsgroup(s).