[libclc] libclc: add missing AMD gfx symlinks (PR #78884)

Zoltán Böszörményi via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 21 21:26:52 PST 2024


https://github.com/zboszor updated https://github.com/llvm/llvm-project/pull/78884

>From 26e8eaaa9b0be1fdc146b5b4e8d285a2e8a2edbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
 <zboszor at gmail.com>
Date: Sun, 21 Jan 2024 07:59:02 +0100
Subject: [PATCH 1/3] libclc: add some missing AMD gfx9 and gfx10 symlinks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Zoltán Böszörményi <zboszor at gmail.com>
---
 libclc/CMakeLists.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 9daef8265c16f26..aa7acd4797602b4 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -154,6 +154,21 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" )
 	set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 )
 endif()
 
+# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added in LLVM 10 (r345120)
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "9.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx909 gfx1010 gfx1011 gfx1012 )
+endif()
+
+# Support for gfx908 was added in LLVM 11 (r373411)
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "10.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx908 )
+endif()
+
+# Support for gfx90c, gfx1030, gfx1031, gfx1032, gfx1033 was added in LLVM 12
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "11.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx90c gfx1030 gfx1031 gfx1032 gfx1033 )
+endif()
+
 # pkg-config file
 configure_file( libclc.pc.in libclc.pc @ONLY )
 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" )

>From 3d35866b080093babea5a12d9dd8a31381107286 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
 <zboszor at gmail.com>
Date: Sun, 21 Jan 2024 08:48:09 +0100
Subject: [PATCH 2/3] libclc: add the remaining missing AMD gfx symlinks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Zoltán Böszörményi <zboszor at gmail.com>
---
 libclc/CMakeLists.txt | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index aa7acd4797602b4..f9792a331589a2a 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -169,6 +169,31 @@ if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "11.99.99" )
 	set( tahiti_aliases ${tahiti_aliases} gfx90c gfx1030 gfx1031 gfx1032 gfx1033 )
 endif()
 
+# Support for tongapro, gfx602, gfx705, gfx805 was added in LLVM 13
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "12.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} tongapro gfx602 gfx705 gfx805 )
+endif()
+
+# Support for gfx90a, gfx1013, gfx1034, gfx1035 was added in LLVM 14
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "13.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx90a gfx1013 gfx1034 gfx1035 )
+endif()
+
+# Support for gfx940, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103 was added in LLVM 16
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "15.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx940 gfx1036 gfx1100 gfx1101 gfx1102 gfx1103 )
+endif()
+
+# Support for gfx941, gfx942, gfx1150, gfx1151 was added in LLVM 18
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "17.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx941 gfx942 gfx1150 gfx1151 )
+endif()
+
+# Support for gfx1200, gfx1201 was added in LLVM 19
+if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "18.99.99" )
+	set( tahiti_aliases ${tahiti_aliases} gfx1200 gfx1201 )
+endif()
+
 # pkg-config file
 configure_file( libclc.pc.in libclc.pc @ONLY )
 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" )

>From e7a35c8a9eec608e367473f7b2b8e37aa47b497c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
 <zboszor at gmail.com>
Date: Mon, 22 Jan 2024 06:24:24 +0100
Subject: [PATCH 3/3] libclc: Remove version checks for extending
 tahiti_aliases
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Zoltán Böszörményi <zboszor at gmail.com>
---
 libclc/CMakeLists.txt | 60 +++++++------------------------------------
 1 file changed, 9 insertions(+), 51 deletions(-)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index f9792a331589a2a..fa1d8e4adbcc4fb 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -142,57 +142,15 @@ set( cypress_aliases hemlock )
 set( barts_aliases turks caicos )
 set( cayman_aliases aruba )
 set( tahiti_aliases pitcairn verde oland hainan bonaire kabini kaveri hawaii
-	mullins tonga iceland carrizo fiji stoney polaris10 polaris11 )
-
-# Support for gfx9 was added in LLVM 5.0 (r295554)
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "4.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx900 gfx902 )
-endif()
-
-# Support for Vega12 and Vega20 was added in LLVM 7 (r331215)
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "6.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx904 gfx906 )
-endif()
-
-# Support for gfx909, gfx1010, gfx1011 and gfx1012 was added in LLVM 10 (r345120)
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "9.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx909 gfx1010 gfx1011 gfx1012 )
-endif()
-
-# Support for gfx908 was added in LLVM 11 (r373411)
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "10.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx908 )
-endif()
-
-# Support for gfx90c, gfx1030, gfx1031, gfx1032, gfx1033 was added in LLVM 12
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "11.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx90c gfx1030 gfx1031 gfx1032 gfx1033 )
-endif()
-
-# Support for tongapro, gfx602, gfx705, gfx805 was added in LLVM 13
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "12.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} tongapro gfx602 gfx705 gfx805 )
-endif()
-
-# Support for gfx90a, gfx1013, gfx1034, gfx1035 was added in LLVM 14
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "13.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx90a gfx1013 gfx1034 gfx1035 )
-endif()
-
-# Support for gfx940, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103 was added in LLVM 16
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "15.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx940 gfx1036 gfx1100 gfx1101 gfx1102 gfx1103 )
-endif()
-
-# Support for gfx941, gfx942, gfx1150, gfx1151 was added in LLVM 18
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "17.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx941 gfx942 gfx1150 gfx1151 )
-endif()
-
-# Support for gfx1200, gfx1201 was added in LLVM 19
-if( ${LLVM_PACKAGE_VERSION} VERSION_GREATER "18.99.99" )
-	set( tahiti_aliases ${tahiti_aliases} gfx1200 gfx1201 )
-endif()
+	mullins tonga tongapro iceland carrizo fiji stoney polaris10 polaris11
+	gfx602 gfx705 gfx805
+	gfx900 gfx902 gfx904 gfx906 gfx908 gfx909 gfx90a gfx90c gfx940 gfx941 gfx942
+	gfx1010 gfx1011 gfx1012 gfx1013
+	gfx1030 gfx1031 gfx1032 gfx1033 gfx1034 gfx1035 gfx1036
+	gfx1100 gfx1101 gfx1102 gfx1103
+	gfx1150 gfx1151
+	gfx1200 gfx1201
+)
 
 # pkg-config file
 configure_file( libclc.pc.in libclc.pc @ONLY )



More information about the cfe-commits mailing list