Skip to content

Move Clang easyconfigs to use LLVM easyblock#23028

Closed
Flamefire wants to merge 2 commits intoeasybuilders:developfrom
Flamefire:20250604131206_new_pr_Clang1816
Closed

Move Clang easyconfigs to use LLVM easyblock#23028
Flamefire wants to merge 2 commits intoeasybuilders:developfrom
Flamefire:20250604131206_new_pr_Clang1816

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jun 4, 2025

This is intended to test easybuilders/easybuild-easyblocks#3755

I'll reduce this to changes and move the new easyconfigs out using correct names and comments (I need a specific commit for Triton)

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

Updated software Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

Diff against Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2582e45acd..2d643ae597 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,8 +1,7 @@
 name = 'Clang'
-easyblock = 'EB_LLVM'
-version = '21.0.0'
+version = "18.1.6"
 versionsuffix = '-CUDA-%(cudaver)s'
-local_commit = '3bd3e06' # 'a66376b0dc3b'
+easyblock = 'EB_LLVM'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -12,11 +11,10 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-sources = [{
-    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
-    'download_filename': '%s.tar.gz' % local_commit,
-    'filename': 'llvm-project-%s.tar.gz' % version,
-}]
+source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
+sources = [
+    'llvm-project-%(version)s.src.tar.xz',
+]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 
Diff against Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
index 1812ea241e..2d643ae597 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "20.1.0"
+version = "18.1.6"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
@@ -42,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-python_bindings = False
-skip_all_tests = True
+build_clang_extras = True
+build_lld = True
+build_lldb = True
 build_runtimes = True
 build_shared_libs = True
+python_bindings = False
+skip_all_tests = True
 use_polly = True
-build_lld = True
-build_lldb = True
-build_clang_extras = True
 
 moduleclass = 'compiler'
Diff against Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
index ad353f5b6a..2d643ae597 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "19.1.0"
+version = "18.1.6"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
@@ -42,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-python_bindings = False
-skip_all_tests = True
+build_clang_extras = True
+build_lld = True
+build_lldb = True
 build_runtimes = True
 build_shared_libs = True
+python_bindings = False
+skip_all_tests = True
 use_polly = True
-build_lld = True
-build_lldb = True
-build_clang_extras = True
 
 moduleclass = 'compiler'

Updated software Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

Diff against Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2582e45acd..ad353f5b6a 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,8 +1,7 @@
 name = 'Clang'
-easyblock = 'EB_LLVM'
-version = '21.0.0'
+version = "19.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
-local_commit = '3bd3e06' # 'a66376b0dc3b'
+easyblock = 'EB_LLVM'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -12,11 +11,10 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-sources = [{
-    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
-    'download_filename': '%s.tar.gz' % local_commit,
-    'filename': 'llvm-project-%s.tar.gz' % version,
-}]
+source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
+sources = [
+    'llvm-project-%(version)s.src.tar.xz',
+]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 
@@ -44,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-build_clang_extras = True
-build_lld = True
-build_lldb = True
-build_runtimes = True
-build_shared_libs = True
 python_bindings = False
 skip_all_tests = True
+build_runtimes = True
+build_shared_libs = True
 use_polly = True
+build_lld = True
+build_lldb = True
+build_clang_extras = True
 
 moduleclass = 'compiler'
Diff against Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 1812ea241e..ad353f5b6a 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "20.1.0"
+version = "19.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
Diff against Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2d643ae597..ad353f5b6a 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "18.1.6"
+version = "19.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
@@ -42,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-build_clang_extras = True
-build_lld = True
-build_lldb = True
-build_runtimes = True
-build_shared_libs = True
 python_bindings = False
 skip_all_tests = True
+build_runtimes = True
+build_shared_libs = True
 use_polly = True
+build_lld = True
+build_lldb = True
+build_clang_extras = True
 
 moduleclass = 'compiler'

Updated software Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

Diff against Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2582e45acd..1812ea241e 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,8 +1,7 @@
 name = 'Clang'
-easyblock = 'EB_LLVM'
-version = '21.0.0'
+version = "20.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
-local_commit = '3bd3e06' # 'a66376b0dc3b'
+easyblock = 'EB_LLVM'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -12,11 +11,10 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-sources = [{
-    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
-    'download_filename': '%s.tar.gz' % local_commit,
-    'filename': 'llvm-project-%s.tar.gz' % version,
-}]
+source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
+sources = [
+    'llvm-project-%(version)s.src.tar.xz',
+]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 
@@ -44,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-build_clang_extras = True
-build_lld = True
-build_lldb = True
-build_runtimes = True
-build_shared_libs = True
 python_bindings = False
 skip_all_tests = True
+build_runtimes = True
+build_shared_libs = True
 use_polly = True
+build_lld = True
+build_lldb = True
+build_clang_extras = True
 
 moduleclass = 'compiler'
Diff against Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index ad353f5b6a..1812ea241e 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "19.1.0"
+version = "20.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
Diff against Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2d643ae597..1812ea241e 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,5 +1,5 @@
 name = 'Clang'
-version = "18.1.6"
+version = "20.1.0"
 versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
 
@@ -42,13 +42,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-build_clang_extras = True
-build_lld = True
-build_lldb = True
-build_runtimes = True
-build_shared_libs = True
 python_bindings = False
 skip_all_tests = True
+build_runtimes = True
+build_shared_libs = True
 use_polly = True
+build_lld = True
+build_lldb = True
+build_clang_extras = True
 
 moduleclass = 'compiler'

Updated software Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb

Diff against Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 1812ea241e..2582e45acd 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-20.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,7 +1,8 @@
 name = 'Clang'
-version = "20.1.0"
-versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
+version = '21.0.0'
+versionsuffix = '-CUDA-%(cudaver)s'
+local_commit = '3bd3e06' # 'a66376b0dc3b'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -11,10 +12,11 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
-sources = [
-    'llvm-project-%(version)s.src.tar.xz',
-]
+sources = [{
+    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
+    'download_filename': '%s.tar.gz' % local_commit,
+    'filename': 'llvm-project-%s.tar.gz' % version,
+}]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 
@@ -42,13 +44,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-python_bindings = False
-skip_all_tests = True
+build_clang_extras = True
+build_lld = True
+build_lldb = True
 build_runtimes = True
 build_shared_libs = True
+python_bindings = False
+skip_all_tests = True
 use_polly = True
-build_lld = True
-build_lldb = True
-build_clang_extras = True
 
 moduleclass = 'compiler'
Diff against Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index ad353f5b6a..2582e45acd 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-19.1.0-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,7 +1,8 @@
 name = 'Clang'
-version = "19.1.0"
-versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
+version = '21.0.0'
+versionsuffix = '-CUDA-%(cudaver)s'
+local_commit = '3bd3e06' # 'a66376b0dc3b'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -11,10 +12,11 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
-sources = [
-    'llvm-project-%(version)s.src.tar.xz',
-]
+sources = [{
+    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
+    'download_filename': '%s.tar.gz' % local_commit,
+    'filename': 'llvm-project-%s.tar.gz' % version,
+}]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 
@@ -42,13 +44,13 @@ dependencies = [
 enable_rtti = False
 
 assertions = True
-python_bindings = False
-skip_all_tests = True
+build_clang_extras = True
+build_lld = True
+build_lldb = True
 build_runtimes = True
 build_shared_libs = True
+python_bindings = False
+skip_all_tests = True
 use_polly = True
-build_lld = True
-build_lldb = True
-build_clang_extras = True
 
 moduleclass = 'compiler'
Diff against Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
index 2d643ae597..2582e45acd 100644
--- a/easybuild/easyconfigs/c/Clang/Clang-18.1.6-GCCcore-13.3.0-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/c/Clang/Clang-21.0.0-GCCcore-13.3.0-CUDA-12.6.0.eb
@@ -1,7 +1,8 @@
 name = 'Clang'
-version = "18.1.6"
-versionsuffix = '-CUDA-%(cudaver)s'
 easyblock = 'EB_LLVM'
+version = '21.0.0'
+versionsuffix = '-CUDA-%(cudaver)s'
+local_commit = '3bd3e06' # 'a66376b0dc3b'
 
 homepage = 'https://clang.llvm.org/'
 description = """C, C++, Objective-C compiler, based on LLVM.  Does not
@@ -11,10 +12,11 @@ description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 # already specified as the toolchain.
 toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-source_urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s"]
-sources = [
-    'llvm-project-%(version)s.src.tar.xz',
-]
+sources = [{
+    'source_urls': ["https://github.com/llvm/llvm-project/archive"],
+    'download_filename': '%s.tar.gz' % local_commit,
+    'filename': 'llvm-project-%s.tar.gz' % version,
+}]
 
 #checksums = ['10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d']
 

@Crivella
Copy link
Contributor

Crivella commented Jun 4, 2025

I think we should really move on from Clang and start replacing it with LLVM whereever it was used as a dependency.
The new easyblock will always produce atleast both clang and flang which i feel makes the old name confusing.
Also to avoid duplication of effort in maintaining both sets of EasyConfigs

We should also use lit to run the full test suite, a huge part of the effort on the new easyblock was dedicated to making sure we actually are able to.

@Thyre For the CUDA part you definitely have more experience, do we actually need CUDA as a runtime dependency (or even a build dependency, maybe for running the tests?)
Especially with LLVM>=20 the libomptarget-nvptx.bc will end up being produced regardless and does also not need the compute capabilities specified anymore.

@Thyre
Copy link
Collaborator

Thyre commented Jun 4, 2025

CUDA (and in the same sense ROCm) is a tiny bit complicated. We absolutely do not need it to build offload support.
We need it if we want to run the tests, and if we want to ensure that system versions are not picked up. The last part will be resolved with easybuilders/easybuild-easyblocks#3747

I'm not against having it in the EasyConfigs, since that also makes absolutely clear that NVPTX support will be built. I see it more or less as a convenience.

I guess its similar to #22418 in a sense, where CUDA is required for the build, but doesn't actually matter during runtime. Only when you want to offload, you'll need to load CUDA.

@Flamefire
Copy link
Contributor Author

If we remove CUDA as a (build)dependency then the LLVM easyblock will not select the NVTPX backend. And manually specifying it will remove the other defaults.
We could add a new parameter like use_cuda and use_rocm if the tests work without. That has the advantage of getting rid of the CUDA-suffixed ECs.

@Thyre
Copy link
Collaborator

Thyre commented Jun 4, 2025

If we remove CUDA as a (build)dependency then the LLVM easyblock will not select the NVTPX backend. And manually specifying it will remove the other defaults. We could add a new parameter like use_cuda and use_rocm if the tests work without. That has the advantage of getting rid of the CUDA-suffixed ECs.

LLVM selects the NVPTX backend when cuda-compute-capabilities are specified, see:

https://github.com/easybuilders/easybuild-easyblocks/blob/ac2b2f9a5069927a31079219aee732e169e0b05e/easybuild/easyblocks/l/llvm.py#L381-L388

            # If CUDA is included as a dep, add NVPTX as a target
            # There are (old) toolchains with CUDA as part of the toolchain
            if 'cuda' in self.deps or cuda_toolchain:
                self.log.info("CUDA dependency detected, adding NVPTX as a target")
                build_targets.append(BUILD_TARGET_NVPTX)
            elif cuda_cc_list:
                self.log.info("CUDA compute capabilities specified, adding NVPTX as a target")
                build_targets.append(BUILD_TARGET_NVPTX)

with a similar condition for AMD, though there's no config option for that yet (see easybuilders/easybuild-framework#4860)

@Crivella
Copy link
Contributor

Crivella commented Jun 4, 2025

Also for LLVM >= 20 we have build_targets = ['all'] in the EC since we can safely build for all targets by default as we do not neede to specify the CC and AMD_GFX anymore (if you try that with previous version the EasyBlock will complain that you need those set to build for NVPTX and AMDGPU)

@Flamefire
Copy link
Contributor Author

I've moved only the Clang 18 easyconfigs: #23055

Goal there was to have the same result as before for the existing easyconfigs. Newer ECs should use LLVM directly, so closing this.

@Flamefire Flamefire closed this Jun 10, 2025
@Flamefire Flamefire deleted the 20250604131206_new_pr_Clang1816 branch June 10, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants