Plugin Jit Module Registry#
-
template<typename Key, typename LoadedModule>
class PluginJitModuleRegistry# Process-wide registry of driver-loaded plugin JIT modules, keyed by (CUDA context, key, digest). Entries are weak: a module stays loaded while at least one runner holds it and is loaded again on the next request after the last holder is gone.
LoadedModulederives from PluginJitLoadedModule<Key>.Public Functions
- inline explicit PluginJitModuleRegistry(
- char const *const name
- Parameters:
name – Error-message prefix, e.g. “NVFP4-A16 Blackwell GEMV JIT”.
- PluginJitKernel<Key> const &kernel,
- BindFunctions &&bindFunctions
Load
kernelinto the current CUDA context, or share the module already loaded there for the same key and digest.bindFunctions(LoadedModule&)resolves the entry points fromloaded.module; if it throws, the module is unloaded and nothing is registered.Establishes the primary context when none is current, so this is not capture-safe: call it from configurePlugin / onShapeChange / deserialization, never from enqueue.
- Throws:
std::invalid_argument – when the cubin is not a native ELF image or its digest does not match, std::runtime_error when no CUDA context can be made current
-
template<typename Key>
struct PluginJitLoadedModule# Base of every driver-loaded plugin JIT module: owns the CUmodule and remembers the context it was loaded in and the kernel it came from. Plugins derive from it and add their CUfunction handles, which PluginJitModuleRegistry::load fills through the bindFunctions callback.
Public Functions
-
PluginJitLoadedModule() = default#
-
PluginJitLoadedModule(PluginJitLoadedModule const&) = delete#
- PluginJitLoadedModule &operator=(
- PluginJitLoadedModule const&
-
inline ~PluginJitLoadedModule()#
-
PluginJitLoadedModule() = default#