diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-01-15 14:45:01 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:25:39 +0100 |
| commit | 062f036fecf6db056feaaf127b5df1c39d49f5d8 (patch) | |
| tree | 714fcd89f7f8865a950668fa2d4748a7ad525b33 | |
| parent | 300343d8348159a4d7b50882f18b3be9c570d3cf (diff) | |
gnu: clang-rocm: Add ‘compiler-amd-gpu-targets’ property.
* gnu/packages/llvm.scm (%clang-rocm-supported-gpu-targets): New variable.
(make-clang-rocm): Add ‘compiler-amd-gpu-targets’ property.
Change-Id: I5ec21935db0deeb09483a65e63b7fda786d28d8f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
| -rw-r--r-- | gnu/packages/llvm.scm | 89 |
1 files changed, 88 insertions, 1 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 5ae9f19f0b4..54713a64f78 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -1296,6 +1296,89 @@ Library.") ;; toplevel variables cannot be called from one file to another. (define %rocm-llvm-version "7.1.0") +(define %clang-rocm-supported-gpu-targets + ;; List of supported GPU targets for the current version of clang-rocm. + ;; This list can be obtained by running: + ;; + ;; guix shell clang-rocm -- \ + ;; clang --target=amdgcn-amd-amdhsa -mcpu=help -nogpulib + ;; + ;; See also <https://llvm.org/docs/AMDGPUUsage.html#amdgpu-processor-table>. + ;; Update this list when upgrading clang-rocm. + '("bonaire" + "carrizo" + "fiji" + "generic" + "generic-hsa" + "gfx10-1-generic" + "gfx10-3-generic" + "gfx1010" + "gfx1011" + "gfx1012" + "gfx1013" + "gfx1030" + "gfx1031" + "gfx1032" + "gfx1033" + "gfx1034" + "gfx1035" + "gfx1036" + "gfx11-generic" + "gfx1100" + "gfx1101" + "gfx1102" + "gfx1103" + "gfx1150" + "gfx1151" + "gfx1152" + "gfx1153" + "gfx12-generic" + "gfx1200" + "gfx1201" + "gfx600" + "gfx601" + "gfx602" + "gfx700" + "gfx701" + "gfx702" + "gfx703" + "gfx704" + "gfx705" + "gfx801" + "gfx802" + "gfx803" + "gfx805" + "gfx810" + "gfx9-4-generic" + "gfx9-generic" + "gfx900" + "gfx902" + "gfx904" + "gfx906" + "gfx908" + "gfx909" + "gfx90a" + "gfx90c" + "gfx940" + "gfx941" + "gfx942" + "gfx950" + "hainan" + "hawaii" + "iceland" + "kabini" + "kaveri" + "mullins" + "oland" + "pitcairn" + "polaris10" + "polaris11" + "stoney" + "tahiti" + "tonga" + "tongapro" + "verde")) + (define (make-llvm-rocm llvm-base) (package (inherit llvm-base) @@ -1406,7 +1489,11 @@ This AMD fork includes AMD-specific additions.")))) #:test-target "check-clang" args))) (replace 'add-tools-extra (lambda _ - (copy-recursively "../clang-tools-extra" "tools/extra"))))))))) + (copy-recursively "../clang-tools-extra" "tools/extra"))))))) + + (properties + `((compiler-amd-gpu-targets . ,%clang-rocm-supported-gpu-targets) + ,@(package-properties clang-base))))) (define-public clang-rocm (make-clang-rocm clang-20)) |
