diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-03 20:00:38 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-05-03 20:00:38 +0000 |
commit | ae9830cdb86118db1283a1d00a6dde82ab2b201e (patch) | |
tree | 22d64581e03fd5a9ec452c1f182851e54beb2f63 /libomptarget/deviceRTLs/nvptx/src/libcall.cu | |
parent | 49325fc6abe74ff4a67ef19409999d128d17dca6 (diff) |
[OPENMP][NVPTX]Improve thread limit counter, NFC.
Summary:
Patch improves performance of the full runtime mode by moving
thread-limit counter to the shared memory. It also allows to save
global memory.
Reviewers: grokos, gtbercea, kkwli0
Subscribers: guansong, jdoerfert, caomhin, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D61526
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@359922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget/deviceRTLs/nvptx/src/libcall.cu')
-rw-r--r-- | libomptarget/deviceRTLs/nvptx/src/libcall.cu | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libomptarget/deviceRTLs/nvptx/src/libcall.cu b/libomptarget/deviceRTLs/nvptx/src/libcall.cu index 681b819..ae6f83f 100644 --- a/libomptarget/deviceRTLs/nvptx/src/libcall.cu +++ b/libomptarget/deviceRTLs/nvptx/src/libcall.cu @@ -70,10 +70,7 @@ EXTERN int omp_get_max_threads(void) { EXTERN int omp_get_thread_limit(void) { if (isSPMDMode()) return GetNumberOfThreadsInBlock(); - // per contention group.. meaning threads in current team - omptarget_nvptx_TaskDescr *currTaskDescr = - getMyTopTaskDescriptor(/*isSPMDExecutionMode=*/false); - int rc = currTaskDescr->ThreadLimit(); + int rc = threadLimit; PRINT(LD_IO, "call omp_get_thread_limit() return %d\n", rc); return rc; } |