Expand description
Stream-ordered device memory runtime.
crate::CudaProviderBuilder constructs one XlogDeviceRuntime and one
crate::GpuMemoryManager that share the provider’s exact CUDA device.
The runtime owns the stream pool and composes the production resource stack:
XlogDeviceRuntime
-> StreamPool of non-blocking streams
-> LoggingResource (optional)
-> GlobalDeviceBudget
-> AsyncCudaResourceGlobalDeviceBudget is the sole byte-admission authority. Optional
LoggingResource wraps it so successful operations and typed admission
failures are both observable exactly once. DirectCudaResource remains
available for crate tests that need a synchronous allocator; canonical
providers always use AsyncCudaResource.
Stream-ordered contract: every alloc / dealloc names a stream; reuse across streams requires explicit event/sync. No reliance on the CUDA null/default stream.
Re-exports§
pub use async_resource::AsyncCudaResource;pub use budget::GlobalDeviceBudget;pub use direct::DirectCudaResource;pub use logging::InMemorySink;pub use logging::LogAction;pub use logging::LogRecord;pub use logging::LogResult;pub use logging::LoggingResource;pub use logging::LoggingSink;pub use logging::NullSink;pub use logging::SinkError;pub use resource::Access;pub use resource::AllocTag;pub use resource::AllocationAccounting;pub use resource::AllocationRequest;pub use resource::BlockId;pub use resource::BlockState;pub use resource::DeviceBlock;pub use resource::DeviceMemoryResource;pub use resource::Generation;pub use resource::ResourceBudgetSnapshot;pub use resource::ResourceError;pub use resource::ResourceResult;pub use resource::StreamId;pub use runtime::ConditionalGraphStats;pub use runtime::EventLifecycleStats;pub use runtime::ResidentCompletionEvent;pub use runtime::ResidentGraphHandleLifecycleStats;pub use runtime::XlogDeviceRuntime;pub use stream_pool::StreamPool;pub use stream_pool::StreamPoolError;pub use stream_pool::DEFAULT_MAX_STREAMS;
Modules§
- async_
resource - Stream-bound allocation through the shared raw storage owner.
- budget
- Per-runtime budget over the canonical memory resource.
- direct
- Default-device-stream allocation through the shared raw storage owner.
- logging
LoggingResource— telemetry decorator for anyDeviceMemoryResource.- resource
- Core
DeviceMemoryResourcetrait and supporting types. - runtime
XlogDeviceRuntimehosts one provider-owned CUDA device, stream pool, and decorated memory-resource stack.- stream_
pool StreamPool— owned non-blocking CUDA streams indexed byStreamId.