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

Jan Patrick Lehr via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 01:31:10 PDT 2026


https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/174955

>From da6d4811bfe1cb7eb64d11a0c07aaf26849efd5c 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/5] [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 | 18 +++++++++++-------
 2 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 07ba48e11ac5e..a862fdef01b6d 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
@@ -66,7 +67,6 @@
         "mlir",
         "polly",
         "flang",
-        "openmp",
     },
 }
 
@@ -74,7 +74,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
@@ -87,7 +91,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"},
@@ -96,7 +102,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.
@@ -115,6 +121,7 @@
     "libcxxabi",
     "libunwind",
     "flang-rt",
+    "offload",
 }
 
 # These are projects that we should test if the project itself is changed but
@@ -136,6 +143,7 @@
     "libcxx",
     "libcxxabi",
     "libunwind",
+    "offload",
 }
 
 PROJECT_CHECK_TARGETS = {
@@ -158,7 +166,6 @@
     "lld": "check-lld",
     "lldb": "check-lldb",
     "mlir": "check-mlir",
-    "openmp": "check-openmp",
     "polly": "check-polly",
     "lit": "check-lit",
 }
@@ -171,6 +178,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 432872e558703..3202bca359c7b 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"],
@@ -90,7 +91,8 @@ def test_clang(self):
             "check-clang check-clang-tools check-cross-project check-lldb",
         )
         self.assertEqual(
-            env_variables["runtimes_to_build"], "compiler-rt;libcxx;libcxxabi;libunwind"
+            env_variables["runtimes_to_build"],
+            "compiler-rt;libcxx;libcxxabi;libunwind;offload;openmp",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets"],
@@ -165,7 +167,8 @@ def test_cir(self):
             "check-clang check-clang-cir check-clang-tools check-cross-project check-lldb",
         )
         self.assertEqual(
-            env_variables["runtimes_to_build"], "compiler-rt;libcxx;libcxxabi;libunwind"
+            env_variables["runtimes_to_build"],
+            "compiler-rt;libcxx;libcxxabi;libunwind;offload;openmp",
         )
         self.assertEqual(
             env_variables["runtimes_check_targets"],
@@ -306,7 +309,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"],
@@ -380,7 +383,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"],
@@ -415,7 +418,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"],
@@ -439,7 +442,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 c91b559a562cd1ca4ce7898134a3267504311649 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/5] 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 a862fdef01b6d..bd3d811060b90 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"},
 }
 
@@ -74,11 +74,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 bbfb85db004c3e906c92f3d9f10b818d1c6c2119 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/5] 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 bd3d811060b90..6747f8a5b5387 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -162,8 +162,10 @@
     "lld": "check-lld",
     "lldb": "check-lldb",
     "mlir": "check-mlir",
+    "openmp": "check-openmp",
     "polly": "check-polly",
     "lit": "check-lit",
+    "offload": "check-offload",
 }
 
 RUNTIMES = {

>From 2add08a063ac657d3ef5499b830b0b8c9e8eaded 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/5] 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 6747f8a5b5387..d53dc5b72b1cd 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -165,7 +165,7 @@
     "openmp": "check-openmp",
     "polly": "check-polly",
     "lit": "check-lit",
-    "offload": "check-offload",
+    "offload": "offload",
 }
 
 RUNTIMES = {

>From 08c97cbf889841738962e6866706fbdf18b1b134 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/5] 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 d53dc5b72b1cd..118f45867ebae 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -162,7 +162,7 @@
     "lld": "check-lld",
     "lldb": "check-lldb",
     "mlir": "check-mlir",
-    "openmp": "check-openmp",
+    "openmp": "openmp",
     "polly": "check-polly",
     "lit": "check-lit",
     "offload": "offload",



More information about the llvm-commits mailing list