[Openmp-commits] [PATCH] D102407: [libomptarget][amdgpu] Fix truncation error for partial wavefront

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu May 13 09:32:14 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG10de21720989: [libomptarget][amdgpu] Fix truncation error for partial wavefront (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102407/new/

https://reviews.llvm.org/D102407

Files:
  openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip


Index: openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
===================================================================
--- openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
+++ openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
@@ -56,7 +56,7 @@
 {
   __atomic_thread_fence(__ATOMIC_ACQUIRE);
 
-  uint32_t num_waves = num_threads / WARPSIZE;
+  uint32_t num_waves = (num_threads + WARPSIZE - 1) / WARPSIZE;
 
   // Partial barrier implementation for amdgcn.
   // Uses two 16 bit unsigned counters. One for the number of waves to have


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102407.345187.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210513/36fe5ff6/attachment.bin>


More information about the Openmp-commits mailing list