Module cuda_host

Module cuda_host 

Source
Expand description

The process-scoped half of the CUDA runtime: the context, the stream, and the teardown check that guards a model swap.

Split from crate::registry because the two have different lifetimes and conflating them is what made in-process model swapping impossible. The host is derived from the device and lives for the process; the module registry is derived from the checkpoint and lives for one model.

Structs§

CudaHost
The CUDA context and stream — process-scoped, on purpose.

Functions§

host
Get (or create) the process CUDA host on ordinal.
release
Release a registry, refusing to pretend if anything still holds a handle.