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

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 10:01:38 PDT 2018


Hahnfeld 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;
----------------
ABataev wrote:
> 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?
Yes please.


Repository:
  rL LLVM

https://reviews.llvm.org/D51222





More information about the llvm-commits mailing list