[llvm] [CI] Enable OpenMP and Offload runtime in premerge (PR #174955)

Jan Patrick Lehr via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 08:03:30 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 1/7] [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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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"],



More information about the llvm-commits mailing list