[all-commits] [llvm/llvm-project] 9bcf9d: [libc] Fix missing warp sync for the NVPTX assert

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Oct 10 10:50:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bcf9dc98a6829ae3b0b18aa82368def394af7f4
      https://github.com/llvm/llvm-project/commit/9bcf9dc98a6829ae3b0b18aa82368def394af7f4
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-10-10 (Tue, 10 Oct 2023)

  Changed paths:
    M libc/src/assert/gpu/__assert_fail.cpp

  Log Message:
  -----------
  [libc] Fix missing warp sync for the NVPTX assert

Summary:
The implementation of `assert` has an if statement so that only the
first thread in the warp prints the assertion. On modern NVPTX
architecture, this can be printed out of order with the abort call. This
would lead to only a portion of the message being printed and then
exiting the program. By adding a mandatory warp sync we force the full
string to be printed before we continue to the abort.




More information about the All-commits mailing list