[Openmp-commits] [PATCH] D55514: [OPENMP][NVPTX]Revert __kmpc_shuffle_int64 to its original form.
Alexey Bataev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Dec 10 08:41:55 PST 2018
ABataev created this revision.
ABataev added a reviewer: gtbercea.
Herald added a subscriber: guansong.
gtbercea accepted this revision.
gtbercea added a comment.
This revision is now accepted and ready to land.
LG
Use the original shuffle implementation for __kmpc_shuffle_int64 since
default implementation uses the same implementation.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D55514
Files:
libomptarget/deviceRTLs/nvptx/src/reduction.cu
Index: libomptarget/deviceRTLs/nvptx/src/reduction.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/reduction.cu
+++ libomptarget/deviceRTLs/nvptx/src/reduction.cu
@@ -76,17 +76,12 @@
}
EXTERN int64_t __kmpc_shuffle_int64(int64_t val, int16_t delta, int16_t size) {
-#if defined(CUDART_VERSION) && CUDART_VERSION >= 9000
- return __SHFL_DOWN_SYNC(0xFFFFFFFFFFFFFFFFLL, (long long)val, (unsigned)delta,
- (int)size);
-#else
int lo, hi;
asm volatile("mov.b64 {%0,%1}, %2;" : "=r"(lo), "=r"(hi) : "l"(val));
hi = __SHFL_DOWN_SYNC(0xFFFFFFFF, hi, delta, size);
lo = __SHFL_DOWN_SYNC(0xFFFFFFFF, lo, delta, size);
asm volatile("mov.b64 %0, {%1,%2};" : "=l"(val) : "r"(lo), "r"(hi));
return val;
-#endif
}
static INLINE void gpu_regular_warp_reduce(void *reduce_data,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55514.177524.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181210/cb4dacce/attachment.bin>
More information about the Openmp-commits
mailing list