[llvm] [CI] Enable OpenMP and Offload runtime in premerge (PR #174955)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 03:56:55 PDT 2026
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/174955
>From 9c528d0e9317d3b385c2b1bc01e7a8c9e0fa0226 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Thu, 8 Jan 2026 05:55:56 -0600
Subject: [PATCH 01/10] [CI][Offload][OpenMP] Enable OpenMP and Offload runtime
Offload and OpenMP have been disabled in pre-commit build and test for
quite some time. Recently, some CMake changes were made and the build
command in premerge testing seems to have changed.
This PR enables the build of OpenMP and Offload in premerge CI. It
should not run tests, given community feedback about the reliability of
the test suites.
---
.ci/compute_projects.py | 21 +++++++++++++++------
.ci/compute_projects_test.py | 16 +++++++++-------
2 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 97caec7ad947d..95f58d464d0ee 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -25,7 +25,6 @@
"compiler-rt": {"clang", "lld"},
"cross-project-tests": {"clang", "lldb", "lld"},
"libc": {"clang", "lld"},
- "openmp": {"clang", "lld"},
"flang": {"llvm", "clang"},
"flang-rt": {"flang"},
"lldb": {"llvm", "clang"},
@@ -33,6 +32,8 @@
"lld": {"llvm"},
"mlir": {"llvm"},
"polly": {"llvm"},
+ "openmp": {"clang", "lld"},
+ "offload": {"clang", "lld", "flang"},
}
# This mapping describes the additional projects that should be tested when a
@@ -67,7 +68,6 @@
"mlir",
"polly",
"flang",
- "openmp",
},
}
@@ -75,7 +75,11 @@
# but not necessarily run for testing. The only case of this currently is lldb
# which needs some runtimes enabled for tests.
DEPENDENT_RUNTIMES_TO_BUILD = {
- "lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"}
+ "lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"},
+ "clang": {"openmp", "offload"},
+ "llvm": {"openmp", "offload"},
+ "lld": {"openmp", "offload"},
+ ".ci": {"openmp", "offload"},
}
# This mapping describes runtimes that should be tested when the key project is
@@ -89,7 +93,9 @@
"compiler-rt": {"compiler-rt"},
"flang": {"flang-rt"},
"flang-rt": {"flang-rt"},
- ".ci": {"compiler-rt", "libc", "flang-rt", "libclc"},
+ "openmp": {"openmp"},
+ "offload": {"offload"},
+ ".ci": {"compiler-rt", "libc", "flang-rt", "libclc", "openmp", "offload"},
}
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {
"llvm": {"libcxx", "libcxxabi", "libunwind"},
@@ -98,7 +104,7 @@
}
EXCLUDE_LINUX = {
- "openmp", # https://github.com/google/llvm-premerge-checks/issues/410
+ "cross-project-tests", # TODO(issues/132796): Tests are failing.
}
# Runtimes configured for cross-compilation using LLVM_RUNTIME_TARGETS.
@@ -116,6 +122,7 @@
"libcxxabi",
"libunwind",
"flang-rt",
+ "offload",
}
# These are projects that we should test if the project itself is changed but
@@ -137,6 +144,7 @@
"libcxx",
"libcxxabi",
"libunwind",
+ "offload",
}
PROJECT_CHECK_TARGETS = {
@@ -157,7 +165,6 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
}
@@ -170,6 +177,8 @@
"libc",
"flang-rt",
"libclc",
+ "openmp",
+ "offload",
}
# Meta projects are projects that need explicit handling but do not reside
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 394ded6d563f0..406ef09aab80a 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -22,7 +22,8 @@ def test_llvm(self):
"check-bolt check-clang check-clang-tools check-cross-project check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
- env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
+ env_variables["runtimes_to_build"],
+ "libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -91,7 +92,7 @@ def test_clang(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+ "compiler-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -169,7 +170,7 @@ def test_cir(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+ "compiler-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -310,7 +311,7 @@ def test_ci(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
+ "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -384,7 +385,7 @@ def test_premerge_workflow(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
+ "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -419,7 +420,7 @@ def test_third_party_benchmark(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
+ "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -443,7 +444,8 @@ def test_lit(self):
"check-bolt check-clang check-clang-tools check-cross-project check-flang check-lit check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
- env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
+ env_variables["runtimes_to_build"],
+ "libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
>From 9ead5b8a74767d7dcdbc4b249d8b8dd85220057f Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Mon, 23 Feb 2026 06:25:22 -0600
Subject: [PATCH 02/10] Reviewer feedback
---
.ci/compute_projects.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 95f58d464d0ee..c738da7ed5a66 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -25,6 +25,7 @@
"compiler-rt": {"clang", "lld"},
"cross-project-tests": {"clang", "lldb", "lld"},
"libc": {"clang", "lld"},
+ "openmp": {"clang", "lld"},
"flang": {"llvm", "clang"},
"flang-rt": {"flang"},
"lldb": {"llvm", "clang"},
@@ -32,7 +33,6 @@
"lld": {"llvm"},
"mlir": {"llvm"},
"polly": {"llvm"},
- "openmp": {"clang", "lld"},
"offload": {"clang", "lld", "flang"},
}
@@ -75,11 +75,7 @@
# but not necessarily run for testing. The only case of this currently is lldb
# which needs some runtimes enabled for tests.
DEPENDENT_RUNTIMES_TO_BUILD = {
- "lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"},
- "clang": {"openmp", "offload"},
- "llvm": {"openmp", "offload"},
- "lld": {"openmp", "offload"},
- ".ci": {"openmp", "offload"},
+ "lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"}
}
# This mapping describes runtimes that should be tested when the key project is
>From eb78603b102fe928493dcd81ba3d8188ccbecc06 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Thu, 5 Mar 2026 06:42:46 -0600
Subject: [PATCH 03/10] Integrate reviewer feedback
re-added OpenMP -> check-openmp mapping
Added Offload -> check-offload mapping
---
.ci/compute_projects.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index c738da7ed5a66..9afd32747caec 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -161,8 +161,10 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
+ "openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
+ "offload": "check-offload",
}
RUNTIMES = {
>From c2fdafe8605fae9465bd5d60c080d064f6770f98 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Wed, 11 Mar 2026 04:44:15 -0500
Subject: [PATCH 04/10] Use offload target instead of check-offload
Update to use the new offload target, which should *build* the
offloading libraries only w/o running tests.
---
.ci/compute_projects.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 9afd32747caec..996c9a68b84e0 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -164,7 +164,7 @@
"openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
- "offload": "check-offload",
+ "offload": "offload",
}
RUNTIMES = {
>From cbae9c86837fd9a2fe74d64979cb86219d88f6ff Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Wed, 11 Mar 2026 06:55:44 -0500
Subject: [PATCH 05/10] Build OpenMP runtime via openmp target
---
.ci/compute_projects.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 996c9a68b84e0..43fab66903291 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -161,7 +161,7 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "check-openmp",
+ "openmp": "openmp",
"polly": "check-polly",
"lit": "check-lit",
"offload": "offload",
>From ddfe2afa68570aec8da7e1af5316430b4d6adb41 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 2 Jun 2026 09:26:13 -0500
Subject: [PATCH 06/10] Update compute_projects.py
---
.ci/compute_projects.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 43fab66903291..56369eed4e13f 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -100,7 +100,6 @@
}
EXCLUDE_LINUX = {
- "cross-project-tests", # TODO(issues/132796): Tests are failing.
}
# Runtimes configured for cross-compilation using LLVM_RUNTIME_TARGETS.
@@ -161,10 +160,10 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "openmp",
+ "openmp": "openmp", # Run only build in pre-merge
"polly": "check-polly",
"lit": "check-lit",
- "offload": "offload",
+ "offload": "offload", #Run only build in pre-merge
}
RUNTIMES = {
>From cf940cb7bdadd56b79701236966f3a0171b1bbe8 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 2 Jun 2026 09:42:17 -0500
Subject: [PATCH 07/10] Update tests
I honestly only have a vague idea whether the tests are 'correct' now.
The pipeline looks good from what I want it to do.
---
.ci/compute_projects_test.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 406ef09aab80a..dd75a70f1daf6 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -23,7 +23,7 @@ def test_llvm(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "libcxx;libcxxabi;libunwind;offload;openmp",
+ "libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -92,7 +92,7 @@ def test_clang(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
+ "compiler-rt;libc;libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -170,7 +170,7 @@ def test_cir(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
+ "compiler-rt;libc;libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -311,7 +311,7 @@ def test_ci(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
+ "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -385,7 +385,7 @@ def test_premerge_workflow(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
+ "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -420,7 +420,7 @@ def test_third_party_benchmark(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "compiler-rt;flang-rt;libc;libclc;libcxx;libcxxabi;libunwind;offload;openmp",
+ "compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind;offload;openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -445,7 +445,7 @@ def test_lit(self):
)
self.assertEqual(
env_variables["runtimes_to_build"],
- "libcxx;libcxxabi;libunwind;offload;openmp",
+ "libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
>From af841de764b204935ea6e9e2a20134cc74d37cd3 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 2 Jun 2026 10:26:19 -0500
Subject: [PATCH 08/10] Hopefully make format check happy
---
.ci/compute_projects.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 56369eed4e13f..5a09d960c4add 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -160,10 +160,10 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "openmp", # Run only build in pre-merge
+ "openmp": "openmp", # Run only build in pre-merge
"polly": "check-polly",
"lit": "check-lit",
- "offload": "offload", #Run only build in pre-merge
+ "offload": "offload", # Run only build in pre-merge
}
RUNTIMES = {
>From 8d0a1731d831888f9a9276136f5ad17b4d1f44d1 Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 2 Jun 2026 13:05:34 -0500
Subject: [PATCH 09/10] Add missing runtime check-targets to test
---
.ci/compute_projects_test.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index dd75a70f1daf6..7921ba934ea02 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -315,7 +315,7 @@ def test_ci(self):
)
self.assertEqual(
env_variables["runtimes_check_targets"],
- "check-compiler-rt check-flang-rt check-libc check-libclc",
+ "check-compiler-rt check-flang-rt check-libc check-libclc offload openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -389,7 +389,7 @@ def test_premerge_workflow(self):
)
self.assertEqual(
env_variables["runtimes_check_targets"],
- "check-compiler-rt check-flang-rt check-libc check-libclc",
+ "check-compiler-rt check-flang-rt check-libc check-libclc offload openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -424,7 +424,7 @@ def test_third_party_benchmark(self):
)
self.assertEqual(
env_variables["runtimes_check_targets"],
- "check-compiler-rt check-flang-rt check-libc check-libclc",
+ "check-compiler-rt check-flang-rt check-libc check-libclc offload openmp",
)
self.assertEqual(
env_variables["runtimes_check_targets_needs_reconfig"],
>From 3de0200493e8a0be9354237c1a37fb25320b9c6e Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Mon, 8 Jun 2026 05:56:22 -0500
Subject: [PATCH 10/10] Address review remark
---
.ci/compute_projects_test.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 7921ba934ea02..17982a0971420 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -22,8 +22,7 @@ def test_llvm(self):
"check-bolt check-clang check-clang-tools check-cross-project check-flang check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
- env_variables["runtimes_to_build"],
- "libcxx;libcxxabi;libunwind",
+ env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
@@ -444,8 +443,7 @@ def test_lit(self):
"check-bolt check-clang check-clang-tools check-cross-project check-flang check-lit check-lld check-lldb check-llvm check-mlir check-polly",
)
self.assertEqual(
- env_variables["runtimes_to_build"],
- "libcxx;libcxxabi;libunwind",
+ env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
More information about the llvm-commits
mailing list