|
Uni20
Asynchronous tensor and runtime library.
|
Device-local cuBLAS handle pool combined with a shared idle-stream pool. More...
#include <execution.hpp>
Public Member Functions | |
| ExecutionLease | acquire () |
| Block until a handle and then an idle stream are available. | |
| int | device () const noexcept |
| Return the CUDA device served by this execution pool. | |
| ExecutionPool (cuda::StreamPool &streams, std::size_t handle_count) | |
Construct handle_count cuBLAS handles for the stream pool's device. | |
| ExecutionPool (ExecutionPool &&)=delete | |
| ExecutionPool (ExecutionPool const &)=delete | |
| std::size_t | handle_count () const noexcept |
| Return the fixed number of provider handles. | |
| std::size_t | idle_handle_count () const noexcept |
| Return the number of currently idle provider handles. | |
| ExecutionPool & | operator= (ExecutionPool &&)=delete |
| ExecutionPool & | operator= (ExecutionPool const &)=delete |
| std::optional< ExecutionLease > | try_acquire () |
| Try to acquire a handle and stream without waiting. | |
Friends | |
| class | ExecutionAcquireAwaiter |
Device-local cuBLAS handle pool combined with a shared idle-stream pool.
Handle slots and streams are independent persistent pools. Each execution acquisition reserves a handle first, then obtains an actually-idle stream and returns the temporary pair. The execution pool and its stream pool must outlive all leases and deferred handle returns.
| uni20::cublas::ExecutionPool::ExecutionPool | ( | cuda::StreamPool & | streams, |
| std::size_t | handle_count | ||
| ) |
Construct handle_count cuBLAS handles for the stream pool's device.
|
delete |
|
delete |
| ExecutionLease uni20::cublas::ExecutionPool::acquire | ( | ) |
Block until a handle and then an idle stream are available.
|
inlinenoexcept |
Return the CUDA device served by this execution pool.
|
inlinenoexcept |
Return the fixed number of provider handles.
|
inlinenoexcept |
Return the number of currently idle provider handles.
|
delete |
|
delete |
| std::optional< ExecutionLease > uni20::cublas::ExecutionPool::try_acquire | ( | ) |
Try to acquire a handle and stream without waiting.
|
friend |