summaryrefslogtreecommitdiff
path: root/libc/src/time/gpu/nanosleep.cpp
AgeCommit message (Collapse)Author
2025-01-07[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)Joseph Huber
Summary: This patch switches the GPU utility helpers to wrapping around the gpuintrin.h ones with a C++ flavor.
2024-12-17[libc] Enable 'timespec_get' for the GPU build (#120304)Joseph Huber
Summary: Currently fails to build libc++ because this is missing.
2024-12-05Reapply "[libc][windows] start time API implementation (#117775)" (#118886)Schrodinger ZHU Yifan
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-02-13[libc] Remove remaining GPU architecture dependent instructions (#81612)Joseph Huber
Summary: Recent patches have added solutions to the remaining sources of divergence. This patch simply removes the last occures of things like `has_builtin`, `ifdef` or builtins with feature requirements. The one exception here is `nanosleep`, but I made changes in the `__nvvm_reflect` pass to make usage like this actually work at O0. Depends on https://github.com/llvm/llvm-project/pull/81331
2024-02-13[libc] Round up time for GPU nanosleep implementation (#81630)Joseph Huber
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.
2024-01-29[libc][NFC] Remove inline assembly for PTX instructions (#79913)Joseph Huber
Summary: Recent patches have implemented builitin versions of these functions. This patch simply removes uses of inline assembly to hopefully improve optimizations in this area.
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-08-30[libc] Implement the 'nanosleep' function on the GPUJoseph Huber
The GPU has the ability to sleep for very short periods of time. We can map this to the existing `nanosleep` utility. This patch maps the nanosleep utility to the existing hardware instructions as best as possible. Depends on D159118 Reviewed By: JonChesterfield, sivachandra Differential Revision: https://reviews.llvm.org/D159225