Expand description
A thin wrapper around sys.
While all the functions here will return Result, they are mostly all still unsafe because order of operations really matters.
This also only exposes the *_async
version of functions
because mixing the two is confusing and even more unsafe.
This module also groups functions into sub-modules to make naming easier. For example sys::cuStreamCreate() turns into stream::create(), where stream is a module.
Modules
- Context management functions (
cuCtx*
). - Device management functions (
cuDevice*
). - Module management functions (
cuModule*
). - Primary context management functions (
cuDevicePrimaryCtx*
). - Stream management functions (
cuStream*
).
Structs
- Wrapper around sys::CUresult. See nvidia’s CUresult docs
Functions
- Frees memory with stream ordered semantics.
- Initializes the CUDA driver API. MUST BE CALLED BEFORE ANYTHING ELSE
- Launches a cuda functions
- Allocates memory with stream ordered semantics.
- Returns (free, total) memory in bytes.
- Copies memory from Device to Device with stream ordered semantics.
- Copies memory from Device to Host with stream ordered semantics.
- Copies memory from Host to Device with stream ordered semantics.
- Sets device memory with stream ordered semantics.