[Openmp-commits] [openmp] r341328 - [libomptarget][NVPTX] Fix __kmpc_spmd_kernel_deinit
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Mon Sep 3 10:24:23 PDT 2018
Author: hahnfeld
Date: Mon Sep 3 10:24:23 2018
New Revision: 341328
URL: http://llvm.org/viewvc/llvm-project?rev=341328&view=rev
Log:
[libomptarget][NVPTX] Fix __kmpc_spmd_kernel_deinit
If the runtime is uninitialized the master thread must Enqueue the
state object, and ALL threads must return immediately.
Found post-commit of https://reviews.llvm.org/D51222.
Modified:
openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
Modified: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu?rev=341328&r1=341327&r2=341328&view=diff
==============================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu (original)
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu Mon Sep 3 10:24:23 2018
@@ -196,8 +196,8 @@ EXTERN void __kmpc_spmd_kernel_deinit()
int slot = smid() % MAX_SM;
omptarget_nvptx_device_simpleState[slot].Enqueue(
omptarget_nvptx_simpleThreadPrivateContext);
- return;
}
+ return;
}
if (threadId == 0) {
// Enqueue omp state object for use by another team.
More information about the Openmp-commits
mailing list