[libc-commits] [libc] 2e93dd0 - [libc] Fix hanging test on NVPTX due to lack of warp sync
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu May 4 19:38:33 PDT 2023
Author: Joseph Huber
Date: 2023-05-04T21:38:24-05:00
New Revision: 2e93dd06134d4e71436b0aec3f668e0302b6e7ea
URL: https://github.com/llvm/llvm-project/commit/2e93dd06134d4e71436b0aec3f668e0302b6e7ea
DIFF: https://github.com/llvm/llvm-project/commit/2e93dd06134d4e71436b0aec3f668e0302b6e7ea.diff
LOG: [libc] Fix hanging test on NVPTX due to lack of warp sync
Previously this wasn't implemented because it's effectively a no-op.
However, this should be safe to emit on sm_60 architectures. It's
important because it carries semantic importance for whether or not
something can be moved. So we should always emit this instrinsic.
Differential Revision: https://reviews.llvm.org/D149923
Added:
Modified:
libc/src/__support/GPU/nvptx/utils.h
Removed:
################################################################################
diff --git a/libc/src/__support/GPU/nvptx/utils.h b/libc/src/__support/GPU/nvptx/utils.h
index 9f20edf16c62..763675735a2b 100644
--- a/libc/src/__support/GPU/nvptx/utils.h
+++ b/libc/src/__support/GPU/nvptx/utils.h
@@ -130,11 +130,7 @@ LIBC_INLINE uint32_t get_lane_size() { return LANE_SIZE; }
/// Waits for all threads in the warp to reconverge for independent scheduling.
[[clang::convergent]] LIBC_INLINE void sync_lane(uint64_t mask) {
-#if __CUDA_ARCH__ >= 700
__nvvm_bar_warp_sync(mask);
-#else
- (void)mask;
-#endif
}
} // namespace gpu
More information about the libc-commits
mailing list