Cuda_api.Kerneltype t = {module_ : Cuda_types.cu_module Ctypes.structure Ctypes.ptr;function_ : Cuda_types.cu_function Ctypes.structure Ctypes.ptr;name : string;}val cache : (string, t) Spoc_framework.Guarded_cache.tval load_module_from_ptx : name:string -> string -> tLoad a pre-assembled PTX string directly, bypassing NVRTC. The .target directive in the PTX is automatically rewritten to match the device's actual SM, so a PTX built for sm_86 loads cleanly on sm_61 as long as it uses no sm_86-specific instructions.
val load_from_ptx_current : name:string -> ptx:string -> tLoad a pre-assembled PTX string using the already-current CUDA context. The caller must have already set the device context via Device.set_current.
Cached variant of load_from_ptx — same cache as compile_cached. Without it, every launch reloads (and re-JITs) the PTX module, which dominates kernel time on drivers that compile at module-load (NVIDIA JIT, ZLUDA).
Existential wrapper for keeping Ctypes-allocated values alive during FFI calls