[Openmp-commits] [openmp] [Libomptarget] Fix Nvidia offloading hanging on dataRetrieve using RPC (PR #66817)

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Sun Sep 24 13:54:36 PDT 2023


================
@@ -0,0 +1,22 @@
+// RUN: %libomptarget-compile-run-and-check-generic
+
+// REQUIRES: libc
+
+#include <assert.h>
+#include <stdio.h>
+
+#pragma omp declare target to(stdout)
+
+int main() {
+  int r = 0;
+// CHECK: PASS
+#pragma omp target map(from : r)
+  { r = fwrite("PASS\n", 1, sizeof("PASS\n") - 1, stdout); }
+  assert(r == sizeof("PASS\n") - 1 && "Incorrect number of bytes written");
----------------
shiltian wrote:

The current behavior looks like all those async operations can only be "enqueued" at certain point but because the device is busy waiting for the RPC request, it didn't reach the point. As a consequence, the host side is stuck at "issuing" stage.

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


More information about the Openmp-commits mailing list