[Openmp-commits] [openmp] e1dedec - [Libomptarget] Add unroll flag to shared variables loop
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 23 13:45:36 PDT 2021
Author: Joseph Huber
Date: 2021-07-23T16:45:27-04:00
New Revision: e1dedecaa6f83223efde5e0bf98a8f070aa5d6a5
URL: https://github.com/llvm/llvm-project/commit/e1dedecaa6f83223efde5e0bf98a8f070aa5d6a5
DIFF: https://github.com/llvm/llvm-project/commit/e1dedecaa6f83223efde5e0bf98a8f070aa5d6a5.diff
LOG: [Libomptarget] Add unroll flag to shared variables loop
Unrolling this loop provides better performance in practice because it is
executed on the device and is likely to be very small.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D106692
Added:
Modified:
openmp/libomptarget/deviceRTLs/common/src/parallel.cu
Removed:
################################################################################
diff --git a/openmp/libomptarget/deviceRTLs/common/src/parallel.cu b/openmp/libomptarget/deviceRTLs/common/src/parallel.cu
index 839816335c6e6..2656f3e48ce3f 100644
--- a/openmp/libomptarget/deviceRTLs/common/src/parallel.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/parallel.cu
@@ -314,6 +314,7 @@ EXTERN void __kmpc_parallel_51(kmp_Ident *ident, kmp_int32 global_tid,
void **GlobalArgs;
__kmpc_begin_sharing_variables(&GlobalArgs, nargs);
// TODO: faster memcpy?
+#pragma unroll
for (int I = 0; I < nargs; I++)
GlobalArgs[I] = args[I];
}
More information about the Openmp-commits
mailing list