[Openmp-commits] [PATCH] D106692: [Libomptarget] Add unroll flag to shared variables loop
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 23 11:51:46 PDT 2021
jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
jhuber6 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.
Unrolling this loop provides better performance in practice because it is
executed on the device and is likely to be very small.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106692
Files:
openmp/libomptarget/deviceRTLs/common/src/parallel.cu
Index: openmp/libomptarget/deviceRTLs/common/src/parallel.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/common/src/parallel.cu
+++ openmp/libomptarget/deviceRTLs/common/src/parallel.cu
@@ -314,6 +314,7 @@
void **GlobalArgs;
__kmpc_begin_sharing_variables(&GlobalArgs, nargs);
// TODO: faster memcpy?
+#pragma unroll
for (int I = 0; I < nargs; I++)
GlobalArgs[I] = args[I];
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106692.361287.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210723/dca9bbb6/attachment.bin>
More information about the Openmp-commits
mailing list