[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 05:59:41 PDT 2026
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/174955
>From 9a541e48abeafe233916a8460eb83ac5168849c5 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/11] [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 ff69479fff711..9f575b1bb6cf4 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
@@ -139,6 +146,7 @@
"libcxx",
"libcxxabi",
"libunwind",
+ "offload",
}
PROJECT_CHECK_TARGETS = {
@@ -159,7 +167,6 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
}
@@ -172,6 +179,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 c00be376ad7d6..2d2d89e1ca5a2 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 88d55bc6853275e947d3f325c1eb435739d718cd 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/11] 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 9f575b1bb6cf4..596ef773e6c0b 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 8433cd7c138412a73afb10dbbd7973e00e2ea4f1 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/11] 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 596ef773e6c0b..f1fbc21f1895c 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -163,8 +163,10 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
+ "openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
+ "offload": "check-offload",
}
RUNTIMES = {
>From 927d27fff73e0cb48d5e2d798755189d38086d94 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/11] 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 f1fbc21f1895c..4f9f771bcb6a6 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -166,7 +166,7 @@
"openmp": "check-openmp",
"polly": "check-polly",
"lit": "check-lit",
- "offload": "check-offload",
+ "offload": "offload",
}
RUNTIMES = {
>From 232f379c2afe72007a0e2b3449334b13c8b3c977 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/11] 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 4f9f771bcb6a6..8c2ad30157906 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -163,7 +163,7 @@
"libc": "check-libc",
"libclc": "check-libclc",
"mlir": "check-mlir",
- "openmp": "check-openmp",
+ "openmp": "openmp",
"polly": "check-polly",
"lit": "check-lit",
"offload": "offload",
>From faa7907efbba1e9b85aae4c5a5a8db7ddcce13be 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/11] 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 8c2ad30157906..f66021c12e6d1 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.
@@ -163,10 +162,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 078e3627be970fe2bfcb9cf3179889e37d19259c 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/11] 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 2d2d89e1ca5a2..110847a0915d8 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 cc3241997c442d49e48fe3aa3acc6e87a268517b 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/11] 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 f66021c12e6d1..8bf0dd319e5f3 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -162,10 +162,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 72c9f0b446d6412f963b0416fcbab83407844989 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/11] 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 110847a0915d8..657653f0444a3 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 cd83a7bdf704ee49f6dc92f7aa1cd759edbdb592 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/11] 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 657653f0444a3..b44cb11e907af 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"],
>From abb01285c094819ee3f7c576565a27891d8415bd Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Mon, 8 Jun 2026 06:07:25 -0500
Subject: [PATCH 11/11] Revert "Address review remark"
darker complains about formatting without this change.
This reverts commit 3de0200493e8a0be9354237c1a37fb25320b9c6e.
---
.ci/compute_projects_test.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index b44cb11e907af..657653f0444a3 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",
)
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",
)
self.assertEqual(
env_variables["runtimes_check_targets"],
More information about the llvm-commits
mailing list