[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 07:26:58 PDT 2026
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/174955
>From b9b529a21da00b4a583db2a90a1599e497021b72 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/6] [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 ac4cfd695038a71e1ddd8a9bc2f8ac6305760990 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/6] 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 b0a46d1929d88620703bcaf7733a47fd055e4f10 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/6] 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 b0bfb126aba36a646513abf4a928fb8ab20d2e79 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/6] 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 77a8d5562196f3c8b6b6199bb5b779463aa13a60 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/6] 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 601af490da6da3bc617d89589a1ba6f1e00849ea 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/6] 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 = {
More information about the llvm-commits
mailing list