summaryrefslogtreecommitdiff
path: root/openmp/libomptarget
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2018-09-03 17:24:23 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2018-09-03 17:24:23 +0000
commit6f352ece2760e39f60370e27da1b318a59f21c76 (patch)
tree378311bcd0ad7223c879fc65fc26636f6889ccd3 /openmp/libomptarget
parentd57ee221b1507a2ccb24a6a94c3f441fcc8b130b (diff)
[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.
Diffstat (limited to 'openmp/libomptarget')
-rw-r--r--openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu2
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
index 0fe910d23b8..0f7deae51e3 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
@@ -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.