[all-commits] [llvm/llvm-project] 1dacfd: [libc] Round up time for GPU nanosleep implementat...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Feb 13 08:55:41 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1dacfd119071af50eaef21a97a46076ee6ff20fd
https://github.com/llvm/llvm-project/commit/1dacfd119071af50eaef21a97a46076ee6ff20fd
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M libc/src/time/gpu/nanosleep.cpp
Log Message:
-----------
[libc] Round up time for GPU nanosleep implementation (#81630)
Summary:
The GPU `nanosleep` tests would occasionally fail. This was due to the
fact that we used integer division to determine how many ticks we had to
sleep for. This would then truncate, leaving us with a value just
slightly below the requested value. This would then occasionally leave
us with a return value of `-1`. This patch just changes the code to
round up by 1 so we always sleep for at least the requested value.
More information about the All-commits
mailing list