[libc-commits] [libc] [llvm] [OpenMP] Build OpenMP DeviceRTL on SPIR-V (PR #121600)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Jan 7 14:09:56 PST 2025


================
@@ -152,12 +152,14 @@ template <typename T> class optional {
 
 /// Suspend the thread briefly to assist the thread scheduler during busy loops.
 RPC_ATTRS void sleep_briefly() {
-#if defined(__NVPTX__) && defined(RPC_TARGET_IS_GPU)
+#if defined(__SPIRV__)
+  // It's unsupported and __has_builtin doesn't always work as we expect.
----------------
jhuber6 wrote:

I'd prefer a `FIXME: __has_builtin does not work on offloading targets.` or something along those lines.

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


More information about the libc-commits mailing list