Module registry

Module registry 

Source
Expand description

2026-09-25: MetraleRegistry: one model’s kernel modules, loaded into the process CUDA context, with raw driver-API helpers for launches, copies and device symbols.

Owner: gpu-runtime. Invariants:

  • Each raw handle in raw_modules is a view of the cudarc module stored under the same name in modules; unload_raw drains both maps together.
  • A registry owns neither the context nor the stream; both belong to the process-scoped CudaHost.

Re-exports§

pub use crate::cuda_host::CudaHost;
pub use crate::cuda_host::host;
pub use crate::cuda_host::release;

Structs§

MetraleRegistry
2026-09-25: The kernel modules of one loaded model.
RawCudaFunc
2026-09-25: A raw CUfunction handle from MetraleRegistry::raw_function_cached.

Constants§

CUDA_ERROR_DEINITIALIZED
2026-09-25: CUDA_ERROR_DEINITIALIZED: the driver has already shut down. The free paths treat it as nothing to do (see is_teardown_noop).

Functions§

cuda_error_text
2026-09-25: Format a CUresult as "<NAME> (<status>): <description>", with CUDA_UNKNOWN and (no message) when the driver has no name or string for it.
is_teardown_noop
2026-09-25: Whether a CUresult means the context is already gone, so there is nothing to free: CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_INVALID_CONTEXT (201) or CUDA_ERROR_CONTEXT_IS_DESTROYED (709).