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

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 3 09:55:03 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;
----------------
Again looking at this code: Shouldn't all threads `return`, ie should it be outside of `if (threadId == 0)`?


Repository:
  rL LLVM

https://reviews.llvm.org/D51222





More information about the Openmp-commits mailing list