[llvm] [offload] Fix compatibility for level_zero 25.22.33944 (PR #214215)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 06:43:09 PDT 2026


================
@@ -12,7 +12,20 @@
 #include <thread>
 
 struct olLaunchHostFunctionTest : OffloadQueueTest {
-  void SetUp() override { RETURN_ON_FATAL_FAILURE(OffloadQueueTest::SetUp()); }
+  void SetUp() override {
+    RETURN_ON_FATAL_FAILURE(OffloadQueueTest::SetUp());
+
+    // Test if olLaunchHostFunction is supported
+    auto *Result = olLaunchHostFunction(
+        Queue,
+        [](void *) {
+          printf(""); // Making sure the function has side effect
+        },
+        nullptr);
+    if (Result->Code == OL_ERRC_UNSUPPORTED)
+      GTEST_SKIP() << "olLaunchHostFunction is not supported on this platform. "
+                      "Please update your environment";
----------------
blazej-smorawski wrote:

Done

https://github.com/llvm/llvm-project/pull/214215


More information about the llvm-commits mailing list