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.") | |||
| 1296 | ;; toplevel variables cannot be called from one file to another. | 1296 | ;; toplevel variables cannot be called from one file to another. |
| 1297 | (define %rocm-llvm-version "7.1.0") | 1297 | (define %rocm-llvm-version "7.1.0") |
| 1298 | 1298 | ||
| 1299 | (define %clang-rocm-supported-gpu-targets | ||
| 1300 | ;; List of supported GPU targets for the current version of clang-rocm. | ||
| 1301 | ;; This list can be obtained by running: | ||
| 1302 | ;; | ||
| 1303 | ;; guix shell clang-rocm -- \ | ||
| 1304 | ;; clang --target=amdgcn-amd-amdhsa -mcpu=help -nogpulib | ||
| 1305 | ;; | ||
| 1306 | ;; See also <https://llvm.org/docs/AMDGPUUsage.html#amdgpu-processor-table>. | ||
| 1307 | ;; Update this list when upgrading clang-rocm. | ||
| 1308 | '("bonaire" | ||
| 1309 | "carrizo" | ||
| 1310 | "fiji" | ||
| 1311 | "generic" | ||
| 1312 | "generic-hsa" | ||
| 1313 | "gfx10-1-generic" | ||
| 1314 | "gfx10-3-generic" | ||
| 1315 | "gfx1010" | ||
| 1316 | "gfx1011" | ||
| 1317 | "gfx1012" | ||
| 1318 | "gfx1013" | ||
| 1319 | "gfx1030" | ||
| 1320 | "gfx1031" | ||
| 1321 | "gfx1032" | ||
| 1322 | "gfx1033" | ||
| 1323 | "gfx1034" | ||
| 1324 | "gfx1035" | ||
| 1325 | "gfx1036" | ||
| 1326 | "gfx11-generic" | ||
| 1327 | "gfx1100" | ||
| 1328 | "gfx1101" | ||
| 1329 | "gfx1102" | ||
| 1330 | "gfx1103" | ||
| 1331 | "gfx1150" | ||
| 1332 | "gfx1151" | ||
| 1333 | "gfx1152" | ||
| 1334 | "gfx1153" | ||
| 1335 | "gfx12-generic" | ||
| 1336 | "gfx1200" | ||
| 1337 | "gfx1201" | ||
| 1338 | "gfx600" | ||
| 1339 | "gfx601" | ||
| 1340 | "gfx602" | ||
| 1341 | "gfx700" | ||
| 1342 | "gfx701" | ||
| 1343 | "gfx702" | ||
| 1344 | "gfx703" | ||
| 1345 | "gfx704" | ||
| 1346 | "gfx705" | ||
| 1347 | "gfx801" | ||
| 1348 | "gfx802" | ||
| 1349 | "gfx803" | ||
| 1350 | "gfx805" | ||
| 1351 | "gfx810" | ||
| 1352 | "gfx9-4-generic" | ||
| 1353 | "gfx9-generic" | ||
| 1354 | "gfx900" | ||
| 1355 | "gfx902" | ||
| 1356 | "gfx904" | ||
| 1357 | "gfx906" | ||
| 1358 | "gfx908" | ||
| 1359 | "gfx909" | ||
| 1360 | "gfx90a" | ||
| 1361 | "gfx90c" | ||
| 1362 | "gfx940" | ||
| 1363 | "gfx941" | ||
| 1364 | "gfx942" | ||
| 1365 | "gfx950" | ||
| 1366 | "hainan" | ||
| 1367 | "hawaii" | ||
| 1368 | "iceland" | ||
| 1369 | "kabini" | ||
| 1370 | "kaveri" | ||
| 1371 | "mullins" | ||
| 1372 | "oland" | ||
| 1373 | "pitcairn" | ||
| 1374 | "polaris10" | ||
| 1375 | "polaris11" | ||
| 1376 | "stoney" | ||
| 1377 | "tahiti" | ||
| 1378 | "tonga" | ||
| 1379 | "tongapro" | ||
| 1380 | "verde")) | ||
| 1381 | |||
| 1299 | (define (make-llvm-rocm llvm-base) | 1382 | (define (make-llvm-rocm llvm-base) |
| 1300 | (package | 1383 | (package |
| 1301 | (inherit llvm-base) | 1384 | (inherit llvm-base) |
| @@ -1406,7 +1489,11 @@ This AMD fork includes AMD-specific additions.")))) | |||
| 1406 | #:test-target "check-clang" args))) | 1489 | #:test-target "check-clang" args))) |
| 1407 | (replace 'add-tools-extra | 1490 | (replace 'add-tools-extra |
| 1408 | (lambda _ | 1491 | (lambda _ |
| 1409 | (copy-recursively "../clang-tools-extra" "tools/extra"))))))))) | 1492 | (copy-recursively "../clang-tools-extra" "tools/extra"))))))) |
| 1493 | |||
| 1494 | (properties | ||
| 1495 | `((compiler-amd-gpu-targets . ,%clang-rocm-supported-gpu-targets) | ||
| 1496 | ,@(package-properties clang-base))))) | ||
| 1410 | 1497 | ||
| 1411 | (define-public clang-rocm (make-clang-rocm clang-20)) | 1498 | (define-public clang-rocm (make-clang-rocm clang-20)) |
| 1412 | 1499 | ||
