From 031ac7eb9b67d44e1f188f25ea770b904c7b45b4 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:09:31 +0200 Subject: [PATCH 1/7] rm unused env vars --- .buildkite/pipeline.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a5f9eb086..0b30d7e75 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -57,7 +57,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.11" plugins: @@ -76,7 +75,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.12" plugins: @@ -95,7 +93,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.13" plugins: @@ -115,7 +112,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia nightly" plugins: @@ -135,7 +131,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - label: "Julia 1.10 Enzyme" @@ -158,7 +153,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - label: "Julia 1.11 Enzyme" plugins: @@ -177,7 +171,6 @@ steps: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - label: "GPU-less environment" @@ -220,9 +213,7 @@ steps: env: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" env: - JULIA_AMDGPU_LOGGING_ENABLED: true SECRET_CODECOV_TOKEN: "lVqFGgrywYmQrILXBcP8i6TosP+q/W2oTDVLIdkWFWscd/a61oSVb8Tycq3qvngsrdmKU9EevdQo+1x+w7cu4IuTq63ahQc0RFgi4Q29hC52OgN2wFql984Cqq3T96P3jyV0ZljaRT+a+9AY0oWmmCph55amvvQ4DOMq3tfGDbp7gdueQvJmSYQGVT3/9Sjn4/esYppcKBGltQqQX2E7WrHLpnqRmsmjcSeZ/S/+PgPRb4ZnpBecAUP2d/MlPgKfP0ZUGbDlcbGu+ZDZNksxKIYuAlNrWPhpNAro7hACfEk4T5RRpNiwmJyXJZ8LUD8zNYIUKSmHjUtmqhNXgujWXA==;U2FsdGVkX1/v/P2Y7KZsvC55Au6eET37uDE6M5I6J275maix+SMD0EoJQ19cFp/lae+G8V7dvpPGfrh4hj2nOg==" SECRET_DOCUMENTER_KEY: "Z7qQ0/fkPqZNdY/CiipllaxOo9DeuS3PDmeQ+cnnvaNxv7WseZ+xzWZQw8qp9tVmCb5iTpf0Rr6TTUxCb4a6lxCyQxx3Qewmnl/KJOHFIB4OtBAYIm7trCK3IDL28snHdpN3w7+O4tcLPhRr0rSHy7/hKuACR5q2aC2liz6SbJhZzwpHPVdFxZS4xEG9R4tS4UThkwMR9vw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e/dQ87JG430lRimuS2ENBFaNw+mMVJxTJ6fcZPQhcHya25NKfymxbKL4itoDgTaq9MNqjViKZGI/At43NBSWcHx7S8rCNvlvJjyj3BDcFu+7OYYdGhWWy94102nX3KILFaoHtlPVxSe2aod85fq6p1XgRU2p+Ktt68J5wOORB9Zb9+Fx1z5jfInxkrjStNlWTeWmF8A8xUBkHH7Eyu2lXR4j0aFc7sV2VSvtLvgMseWnGvl6lLT" From 423399340788f1dc5bf69b9ed2502a32366658d7 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:09:42 +0200 Subject: [PATCH 2/7] Document more --- docs/src/api/system.md | 3 +++ docs/src/install_tips.md | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/docs/src/api/system.md b/docs/src/api/system.md index a99051815..d85471e41 100644 --- a/docs/src/api/system.md +++ b/docs/src/api/system.md @@ -27,11 +27,14 @@ Several behaviours are configured through [Preferences.jl](https://github.com/Ju | Preference | Set via | Effect | |:--|:--|:--| | `version` / `local` | `AMDGPU.set_rocm_version!` | Select the ROCm version, and whether to use downloaded artifacts or a local ROCm installation. | +| `arch` | preference | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | | `nonblocking_synchronize` | preference | Use non-blocking stream synchronization (default `true`); disable for slightly lower latency. See [Streams](@ref). | | `eager_gc` | `AMDGPU.eager_gc!(::Bool)` | Trigger GC before allocations under memory pressure. See [Memory Allocation and Intrinsics](@ref). | | `hard_memory_limit` | `AMDGPU.hard_memory_limit!("8 GiB")` | Hard cap on GPU memory, checked before every allocation. | | `soft_memory_limit` | `AMDGPU.soft_memory_limit!("6 GiB")` | Advisory limit for the memory pool. | +The `version`, `local` and `arch` preferences belong to the `ROCm_Runtime` subpackage rather than to AMDGPU itself, so when editing `LocalPreferences.toml` by hand they go under a `[ROCm_Runtime]` section. They are compile-time preferences: changing one invalidates precompilation and takes effect after restarting Julia. + ## Debugging kernel launches Set the environment variable `HIP_LAUNCH_BLOCKING=1` (or toggle `AMDGPU.LAUNCH_BLOCKING[] = true` at runtime) to make kernel launches synchronous. This makes errors surface at the offending launch rather than at a later synchronization point, which is invaluable when tracking down a crashing or misbehaving kernel. diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index 0c497c607..1a5e99470 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -20,8 +20,36 @@ The library locations are then discovered through the `ROCm_Runtime_Discovery` package, as described below. Use `AMDGPU.reset_rocm_version!()` to go back to the default artifact-based setup. +### Selecting the provider without loading AMDGPU.jl + +`local` is a compile-time preference, and it also gates whether the artifact is *resolved* at all, so in CI or in a fresh depot it has to be set before `Pkg.instantiate()` rather than through `AMDGPU.set_rocm_version!` (which needs AMDGPU.jl loaded first). Write it directly against `ROCm_Runtime`'s UUID: + +```julia +using Preferences +set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true) +``` + +`AMDGPU.local_rocm` reports which provider was actually selected. Asserting on it is worthwhile in CI, so that a change of default cannot silently swap the ROCm underneath a job. + +### When no artifact matches + +The artifact is chosen from the GPU architectures detected on the host, which on Linux are read from the `/sys/class/kfd/kfd/topology` nodes. If nothing is detected — a container without KFD passthrough, a login node, or a host where the `amdgpu` driver is not loaded — or if the detected architecture is not one of the shipped bundles, then no artifact is downloaded and AMDGPU.jl reports its ROCm components as unavailable. + +This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. + +To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, set the `arch` preference of `ROCm_Runtime` to a comma-separated list of `gfx` targets: + +```julia +using Preferences +set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "arch" => "gfx942"; force=true) +``` + +The `version` preference selects which ROCm distribution the bundle is taken from. Only 7.14 is currently available, so it mainly becomes useful for pinning once more versions ship. + ## Local ROCm discovery +Everything in this section applies only when the `local` preference is set. In the default artifact mode the library paths come from the downloaded bundle, and the `ROCM_PATH`, `DEVICE_LIB_PATH` and `HIP_DEVICE_LIB_PATH` environment variables are ignored. + On Linux, AMDGPU.jl queries the location of ROCm libraries through `rocminfo` by default. If not successful or on Windows, the following standard directories are searched: @@ -35,13 +63,13 @@ function prints the paths of any libraries found. Starting with ROCm 7.14, libraries are installed under a versioned `core-` subdirectory (for example `/opt/rocm/core-7.14/lib`) instead of directly in `/opt/rocm/lib`. AMDGPU.jl handles this automatically by selecting the newest `core-*` directory found under the ROCm root, so keep `ROCM_PATH` pointed at the install root (e.g. `/opt/rocm`) rather than at the versioned subdirectory. A full ("metapackage") install additionally provides a `/opt/rocm/lib` compatibility symlink and needs no special handling; the versioned lookup mainly benefits minimal, GPU-architecture-specific installs that omit that symlink. -Depending on your GPU model and the functionality you want to use, you may have -to force the GPU architecture by setting the `HSA_OVERRIDE_GFX_VERSION` -variable to a compatible version. +## GPU selection and architecture overrides + +These apply in both provider modes, because they are read by the HSA and HIP runtimes themselves rather than by AMDGPU.jl. + +Depending on your GPU model and the functionality you want to use, you may have to force the GPU architecture by setting the `HSA_OVERRIDE_GFX_VERSION` variable to a compatible version. -You may also have more than one type of GPU, for example a dedicated AMD GPU and an integrated one. -In that case use `rocminfo` to find which device they are and setting `HIP_VISIBLE_DEVICES` to the specific device you want to use. -Otherwise the runtime may crash if it sees two different architectures. +You may also have more than one type of GPU, for example a dedicated AMD GPU and an integrated one. In that case use `rocminfo` to find which device they are and setting `HIP_VISIBLE_DEVICES` to the specific device you want to use. Otherwise the runtime may crash if it sees two different architectures. ## Extra Setup Details From 30c73eb7e387998d6cf1cd5a5b6efa46c887028d Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 17:30:03 +0200 Subject: [PATCH 3/7] Add arch kwarg on set_rocm_version! --- docs/src/api/system.md | 2 +- docs/src/install_tips.md | 7 ++++--- src/libs.jl | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/docs/src/api/system.md b/docs/src/api/system.md index d85471e41..b557dd2bf 100644 --- a/docs/src/api/system.md +++ b/docs/src/api/system.md @@ -27,7 +27,7 @@ Several behaviours are configured through [Preferences.jl](https://github.com/Ju | Preference | Set via | Effect | |:--|:--|:--| | `version` / `local` | `AMDGPU.set_rocm_version!` | Select the ROCm version, and whether to use downloaded artifacts or a local ROCm installation. | -| `arch` | preference | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | +| `arch` | `AMDGPU.set_rocm_version!` | Override the GPU architectures used to select the ROCm artifact, as a comma-separated list of `gfx` targets. Useful when no GPU is visible at install time. See [Installation Info](@ref). | | `nonblocking_synchronize` | preference | Use non-blocking stream synchronization (default `true`); disable for slightly lower latency. See [Streams](@ref). | | `eager_gc` | `AMDGPU.eager_gc!(::Bool)` | Trigger GC before allocations under memory pressure. See [Memory Allocation and Intrinsics](@ref). | | `hard_memory_limit` | `AMDGPU.hard_memory_limit!("8 GiB")` | Hard cap on GPU memory, checked before every allocation. | diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index 1a5e99470..87aff584e 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -37,13 +37,14 @@ The artifact is chosen from the GPU architectures detected on the host, which on This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. -To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, set the `arch` preference of `ROCm_Runtime` to a comma-separated list of `gfx` targets: +To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, pass `arch` a `gfx` target or a collection of them: ```julia -using Preferences -set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "arch" => "gfx942"; force=true) +AMDGPU.set_rocm_version!(arch="gfx942") ``` +As with `local`, this writes the `arch` preference of `ROCm_Runtime`, so it can equally be set with `set_preferences!` before AMDGPU.jl is loaded. + The `version` preference selects which ROCm distribution the bundle is taken from. Only 7.14 is currently available, so it mainly becomes useful for pinning once more versions ship. ## Local ROCm discovery diff --git a/src/libs.jl b/src/libs.jl index 639ab7afe..52a8daca5 100644 --- a/src/libs.jl +++ b/src/libs.jl @@ -25,7 +25,7 @@ import AMDGPU_LLVM_Backend_jll: lld_path import ROCmDeviceLibs_jll: bitcode_path as libdevice_libs """ - AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool]) + AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool], [arch]) Configure the active project to use a specific ROCm version from a specific source. @@ -36,20 +36,41 @@ case of a local ROCm, `version` informs AMDGPU.jl which version that is (this may be useful if auto-detection fails). In the case of artifact sources, `version` controls which version will be downloaded and used. -When not specifying either the `version` or the `local_rocm` argument, the +`arch` overrides the GPU architectures the artifact is selected for, given +either as a single `gfx` target (`"gfx942"`) or as a collection of them. It is +only needed when the GPUs of the host cannot be detected, for example when +preparing a depot on a machine without an AMD GPU, and has no effect when a +local ROCm is used. + +When not specifying any of the `version`, `local_rocm` or `arch` arguments, the default behavior will be used, which is to use the most recent compatible artifacts. Note that this will override any preferences that may be configured in a higher-up depot; to clear preferences nondestructively, use [`AMDGPU.reset_rocm_version!`](@ref) instead. """ function set_rocm_version!(version::Union{Nothing,VersionNumber}=nothing; - local_rocm::Union{Nothing,Bool}=nothing) + local_rocm::Union{Nothing,Bool}=nothing, + arch::Union{Nothing,AbstractString,AbstractVector{<:AbstractString}}=nothing) + # Validate before writing anything, so a bad `arch` cannot leave the + # preferences half-applied. The artifact selection splits this value on ',' + # without dropping empty entries, and expects each one to be a gfx target, + # so anything else would only fail later during artifact resolution. + arch_pref = if isnothing(arch) + nothing + else + archs = arch isa AbstractString ? [String(arch)] : String.(arch) + (!isempty(archs) && all(a -> startswith(a, "gfx"), archs)) || throw(ArgumentError( + "`arch` must be a gfx target (e.g. \"gfx942\") or a collection of them, got $(repr(arch))")) + join(archs, ',') + end + Preferences.set_preferences!(ROCm_Runtime, "version" => isnothing(version) ? nothing : "$(version.major).$(version.minor)"; force=true) Preferences.set_preferences!(ROCm_Runtime, "local" => isnothing(local_rocm) ? nothing : string(local_rocm); force=true) + Preferences.set_preferences!(ROCm_Runtime, "arch" => arch_pref; force=true) io = IOBuffer() print(io, "Configured the active project to use ") @@ -61,6 +82,9 @@ function set_rocm_version!(version::Union{Nothing,VersionNumber}=nothing; if local_rocm !== nothing print(io, local_rocm ? " from the local system" : " from artifact sources") end + if arch_pref !== nothing + print(io, " for ", arch_pref) + end print(io, "; please re-start Julia for this to take effect.") @info String(take!(io)) end @@ -68,7 +92,7 @@ end """ AMDGPU.reset_rocm_version!() -Reset the ROCm version preferences in the active project to the default, which +Reset the ROCm preferences in the active project to the default, which is to use the most recent compatible artifacts, unless a higher-up depot has configured a different preference. To force use of the default behavior for the local project, use [`AMDGPU.set_rocm_version!`](@ref) with no arguments. @@ -76,5 +100,6 @@ local project, use [`AMDGPU.set_rocm_version!`](@ref) with no arguments. function reset_rocm_version!() Preferences.delete_preferences!(ROCm_Runtime, "version"; force=true) Preferences.delete_preferences!(ROCm_Runtime, "local"; force=true) - @info "Reset ROCm version preference, please re-start Julia for this to take effect." + Preferences.delete_preferences!(ROCm_Runtime, "arch"; force=true) + @info "Reset ROCm preferences, please re-start Julia for this to take effect." end From e3f89fcfa2ca4153dbab020fc163039c1718cd05 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Tue, 18 Aug 2026 18:13:32 +0200 Subject: [PATCH 4/7] Add diagnostic when no artifact resolves --- src/AMDGPU.jl | 7 +++++++ src/libs.jl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/AMDGPU.jl b/src/AMDGPU.jl index 0700c2c39..9dd679f5e 100644 --- a/src/AMDGPU.jl +++ b/src/AMDGPU.jl @@ -174,6 +174,13 @@ function __init__() end end + # Only worth reporting where a GPU is actually present: without GPU, not + # resolving an artifact is the expected outcome rather than a problem. + if !local_rocm && !ROCm_Runtime.is_available() && + (!Sys.islinux() || ispath("/dev/kfd")) + warn_unresolved_rocm_artifact() + end + if Sys.islinux() if !ispath("/dev/kfd") @debug "/dev/kfd not available (no AMD GPU), skipping initialization" diff --git a/src/libs.jl b/src/libs.jl index 52a8daca5..6b5f31984 100644 --- a/src/libs.jl +++ b/src/libs.jl @@ -24,6 +24,42 @@ end import AMDGPU_LLVM_Backend_jll: lld_path import ROCmDeviceLibs_jll: bitcode_path as libdevice_libs +# When the artifact provider cannot resolve a bundle for this host it simply +# ends up with no libraries at all, which otherwise surfaces only as the generic +# "... is unavailable" warnings during initialization. Those do not say that +# nothing was downloaded, nor that a system-wide ROCm is not picked up unless it +# is opted into, so spell both out along with the architecture we detected. +function warn_unresolved_rocm_artifact() + detected = try + ROCm_Runtime.rocm_arch() + catch err + @debug "Could not query the GPU architecture" exception=(err, catch_backtrace()) + String[] + end + + what = isempty(detected) ? + "no GPU architecture could be detected on this host" : + "no bundle could be resolved for the detected architecture " * + join(detected, ", ") * " (it may be unsupported, or the download may have failed)" + + @warn """ + No ROCm artifact could be resolved: $what. + + AMDGPU.jl downloads ROCm by default and does not fall back to a ROCm + installed on this system; using that one requires opting in: + + AMDGPU.set_rocm_version!(local_rocm=true) + + Alternatively, if the architecture above is wrong or could not be detected, + select the bundle explicitly: + + AMDGPU.set_rocm_version!(arch="gfx1100") + + Either way, restart Julia afterwards. Set `JULIA_DEBUG=ROCm_Runtime` to see + the underlying artifact resolution error. + """ +end + """ AMDGPU.set_rocm_version!([version::VersionNumber]; [local_rocm::Bool], [arch]) From 06d2f8d2ebef9403b2764972447c1f1f4a10f4c5 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 01:00:54 +0200 Subject: [PATCH 5/7] Be explicit about local or artifact in CI --- .buildkite/pipeline.yml | 92 +++++++++++++++++++++++++++++++---------- perf/Project.toml | 1 + 2 files changed, 72 insertions(+), 21 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0b30d7e75..4303aa136 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,3 +1,9 @@ +# AMDGPU.jl chooses between the ROCm_Runtime artifacts and a local ROCm through +# ROCm_Runtime's "local" preference. Every GPU step pins that preference and +# then asserts the provider it actually resolved to, so that a change of default +# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so the +# pinning only has to happen before AMDGPU is first loaded, not before +# instantiating the project. steps: - label: "Documentation" plugins: @@ -36,7 +42,7 @@ steps: # packages have to be dev'ed manually before instantiating -- which rules out # the julia-test plugin, whose pre-command hook instantiates the project # before the step's command gets a chance to run. - - label: "Julia 1.10" + - label: "Julia 1.10 (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.10" @@ -50,15 +56,17 @@ steps: julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.update() - Pkg.test(; coverage=true)' + Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using Pkg; Pkg.test(; coverage=true)' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia 1.11" + - label: "Julia 1.11 (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.11" @@ -69,14 +77,17 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia 1.12" + - label: "Julia 1.12 (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.12" @@ -87,14 +98,41 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + timeout_in_minutes: 90 + env: + JULIA_NUM_THREADS: 4 + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + + # Coverage for the local-ROCm provider, also exercised by the CSCS + # MI300 pipeline. Does not use the julia-test plugin, so the provider is + # pinned before AMDGPU is first loaded and no artifact is fetched. + - label: "Julia 1.12 (local ROCm)" + plugins: + - JuliaCI/julia#v1: + version: "1.12" + - JuliaCI/julia-coverage#v1: + codecov: true + agents: + queue: "rocm" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' + julia --project -e 'using Pkg; Pkg.test(; coverage=true)' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia 1.13" + - label: "Julia 1.13 (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.13" @@ -105,15 +143,17 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 - soft_fail: true env: JULIA_NUM_THREADS: 4 JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia nightly" + - label: "Julia nightly (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "nightly" @@ -124,7 +164,10 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 30 soft_fail: true env: @@ -132,8 +175,8 @@ steps: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - # see the "Julia 1.10" step for why this doesn't use the julia-test plugin - - label: "Julia 1.10 Enzyme" + # see the "Julia 1.10 (ROCm artifacts)" step for why this doesn't use the plugin + - label: "Julia 1.10 Enzyme (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.10" @@ -145,8 +188,10 @@ steps: julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.update() - Pkg.test(; test_args=["enzyme"])' + Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using Pkg; Pkg.test(; test_args=["enzyme"])' timeout_in_minutes: 45 soft_fail: true env: @@ -154,7 +199,7 @@ steps: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - - label: "Julia 1.11 Enzyme" + - label: "Julia 1.11 Enzyme (ROCm artifacts)" plugins: - JuliaCI/julia#v1: version: "1.11" @@ -164,7 +209,10 @@ steps: queue: "rocm" rocmgpu: "*" if: build.message !~ /\[skip tests\]/ - command: "julia --project -e 'using Pkg; Pkg.update()'" + command: | + julia --project -e 'using Pkg; Pkg.update()' + julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 45 soft_fail: true env: @@ -172,7 +220,7 @@ steps: JULIA_AMDGPU_CORE_MUST_LOAD: "1" JULIA_AMDGPU_HIP_MUST_LOAD: "1" - # see the "Julia 1.10" step for why this doesn't use the julia-test plugin + # see the "Julia 1.10 (ROCm artifacts)" step for why this doesn't use the plugin - label: "GPU-less environment" plugins: - JuliaCI/julia#v1: @@ -199,8 +247,10 @@ steps: println("--- :julia: Instantiating benchmark project") using Pkg Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) - Pkg.instantiate() - + Pkg.instantiate()' + julia --project=perf -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' + julia --project=perf -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project=perf -e ' println("+++ :julia: Running benchmarks") include("perf/runbenchmarks.jl")' artifact_paths: diff --git a/perf/Project.toml b/perf/Project.toml index fd8e4665b..fed23f7d2 100644 --- a/perf/Project.toml +++ b/perf/Project.toml @@ -1,6 +1,7 @@ [deps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +Preferences = "21216c6a-2e73-6563-6e65-726566657250" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" From 7ceee079e80e93cbebba63a590f6fc5cb679b31d Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 08:35:49 +0200 Subject: [PATCH 6/7] Improve docs --- docs/src/install_tips.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/src/install_tips.md b/docs/src/install_tips.md index 87aff584e..949a10f11 100644 --- a/docs/src/install_tips.md +++ b/docs/src/install_tips.md @@ -35,7 +35,21 @@ set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => " The artifact is chosen from the GPU architectures detected on the host, which on Linux are read from the `/sys/class/kfd/kfd/topology` nodes. If nothing is detected — a container without KFD passthrough, a login node, or a host where the `amdgpu` driver is not loaded — or if the detected architecture is not one of the shipped bundles, then no artifact is downloaded and AMDGPU.jl reports its ROCm components as unavailable. -This is not a fallback: an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. The bundles currently shipped cover `gfx908`, `gfx90a`, `gfx94x` and `gfx950` for Instinct, and `gfx101x`, `gfx103x`, `gfx110x`, `gfx1150` through `gfx1153` and `gfx120x` for Radeon. +There is no fallback path: the provider is decided when AMDGPU.jl is loaded, so an existing system-wide ROCm is only picked up after explicitly opting in with the `local` preference above. + +The bundles currently shipped are: + +```@eval +using AMDGPU, TOML, Markdown +toml = TOML.parsefile(joinpath(pkgdir(AMDGPU.ROCm_Runtime), "Artifacts.toml")) +bundles = Dict{String,Set{String}}() +for entry in toml["ROCm_Runtime"] + push!(get!(bundles, entry["rocm_arch"], Set{String}()), entry["os"]) +end +rows = ["| `$arch` | $(join(sort(collect(bundles[arch])), ", ")) |" + for arch in sort(collect(keys(bundles)))] +Markdown.parse(join(vcat("| Bundle | Platforms |", "|:--|:--|", rows), "\n")) +``` To pin the architecture when detection is not possible, for example when preparing a depot on a CPU-only build machine, pass `arch` a `gfx` target or a collection of them: From 5d4f133b9009cc436b6229a7425f6ef8c52e47f0 Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 19 Aug 2026 09:01:41 +0200 Subject: [PATCH 7/7] Up --- .buildkite/pipeline.yml | 45 +++++++++++++++++++++-------------------- perf/Project.toml | 1 - 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 4303aa136..71924eb54 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,9 +1,10 @@ # AMDGPU.jl chooses between the ROCm_Runtime artifacts and a local ROCm through -# ROCm_Runtime's "local" preference. Every GPU step pins that preference and +# ROCm_Runtime's "local" preference. Every GPU step writes that preference and # then asserts the provider it actually resolved to, so that a change of default -# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so the -# pinning only has to happen before AMDGPU is first loaded, not before -# instantiating the project. +# cannot silently swap the ROCm underneath a job. The artifacts are lazy, so +# Pkg.instantiate/update download nothing; the pin only has to be in place +# before AMDGPU is first loaded, which also covers the steps where the +# julia-test plugin instantiates before the command below runs. steps: - label: "Documentation" plugins: @@ -53,12 +54,12 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project -e 'using Pkg; Pkg.test(; coverage=true)' timeout_in_minutes: 90 env: @@ -78,9 +79,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -99,9 +100,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -122,9 +123,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = true\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "true"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm || error("this step selected a local ROCm, but AMDGPU resolved to the ROCm artifacts")' julia --project -e 'using Pkg; Pkg.test(; coverage=true)' timeout_in_minutes: 90 env: @@ -144,9 +145,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 90 env: JULIA_NUM_THREADS: 4 @@ -165,9 +166,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 30 soft_fail: true env: @@ -185,12 +186,12 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e ' using Pkg Pkg.develop([PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project -e 'using Pkg; Pkg.test(; test_args=["enzyme"])' timeout_in_minutes: 45 soft_fail: true @@ -210,9 +211,9 @@ steps: rocmgpu: "*" if: build.message !~ /\[skip tests\]/ command: | + printf '[ROCm_Runtime]\nlocal = false\n' > LocalPreferences.toml julia --project -e 'using Pkg; Pkg.update()' - julia --project -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' timeout_in_minutes: 45 soft_fail: true env: @@ -243,13 +244,13 @@ steps: - JuliaCI/julia#v1: version: "1.12" command: | + printf '[ROCm_Runtime]\nlocal = false\n' > perf/LocalPreferences.toml julia --project=perf -e ' println("--- :julia: Instantiating benchmark project") using Pkg Pkg.develop([PackageSpec(path="."), PackageSpec(path="ROCm_Runtime"), PackageSpec(path="ROCm_Runtime_Discovery")]) Pkg.instantiate()' - julia --project=perf -e 'using Preferences; set_preferences!(Base.UUID("3129f4d2-de71-4ff3-9833-76037e3ea355"), "local" => "false"; force=true)' - julia --project=perf -e 'using AMDGPU; AMDGPU.versioninfo(); AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' + julia --project=perf -e 'using AMDGPU; AMDGPU.local_rocm && error("this step selected the ROCm artifacts, but AMDGPU resolved to a local ROCm")' julia --project=perf -e ' println("+++ :julia: Running benchmarks") include("perf/runbenchmarks.jl")' diff --git a/perf/Project.toml b/perf/Project.toml index fed23f7d2..fd8e4665b 100644 --- a/perf/Project.toml +++ b/perf/Project.toml @@ -1,7 +1,6 @@ [deps] AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -Preferences = "21216c6a-2e73-6563-6e65-726566657250" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"