[Openmp-commits] [PATCH] D51222: [OPENMP][NVPTX] Lightweight runtime support for SPMD mode.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 3 09:59:13 PDT 2018

ABataev added inline comments.

Comment at: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu:192-200
+  if (isRuntimeUninitialized()) {
+    if (threadId == 0) {
+      // Enqueue omp state object for use by another team.
+      int slot = smid() % MAX_SM;
+      omptarget_nvptx_device_simpleState[slot].Enqueue(
+          omptarget_nvptx_simpleThreadPrivateContext);
+      return;
Hahnfeld wrote:
> Again looking at this code: Shouldn't all threads `return`, ie should it be outside of `if (threadId == 0)`?
You're right, that was an original intention. Could commit a quick fix?



More information about the Openmp-commits mailing list