[llvm-branch-commits] [llvm] [libsycl] add single_task (PR #188797)
Sergey Semenov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 27 09:40:42 PDT 2026
================
@@ -0,0 +1,54 @@
+// REQUIRES: any-device
+// RUN: %clangxx -fsycl %s -o %t.out
+// RUN: %t.out
+
+#include <iostream>
+
+#include <sycl/sycl.hpp>
+
+using namespace sycl;
+
+class Kernel1;
+
+bool check(backend be) {
+ switch (be) {
+ case backend::opencl:
+ case backend::level_zero:
+ case backend::cuda:
+ case backend::hip:
+ return true;
+ default:
+ return false;
+ }
+ return false;
+}
+
+inline void return_fail() {
+ std::cout << "Failed" << std::endl;
+ exit(1);
+}
+
+int main() {
+ for (const auto &plt : platform::get_platforms()) {
+ if (check(plt.get_backend()) == false) {
----------------
sergey-semenov wrote:
```suggestion
if (!check(plt.get_backend())) {
```
https://github.com/llvm/llvm-project/pull/188797
More information about the llvm-branch-commits
mailing list