warp.CudaManagedAllocator#
- class warp.CudaManagedAllocator[source]#
Allocator that creates CUDA managed-memory arrays.
The allocator object is not bound to one CUDA device and can be reused across devices. Each allocation still happens under a specific CUDA context, and that context’s device must support CUDA managed memory. Warp pushes the target CUDA context before invoking
allocate(). Direct calls toallocate()require an active CUDA context.Managed allocation uses
cudaMallocManaged(). Allocate managed arrays before CUDA graph capture begins and reuse the existing arrays inside captured work for maximum CUDA compatibility.- __init__()#
Methods
__init__()allocate(size_in_bytes)deallocate(ptr, size_in_bytes)Attributes
- deallocate_requires_context_guard = False#
- memory_kind = 5#