cuda-api-wrappers
cuda-api-wrappers copied to clipboard
Support CUlibrary's and CUkernel's - CUDA driver low-level "library management"
Beginning with CUDA 12.0, we now have access to several functions for handling "libraries" of context-less "kernels":
https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__LIBRARY.html
One can get a context-associated module or kernel by calling cuKernelGetFunction() or cuLibraryGetModule().
Functions:
CUresult cuKernelGetAttribute ( int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev );
CUresult cuKernelGetFunction ( CUfunction* pFunc, CUkernel kernel );
CUresult cuKernelGetName ( const char** name, CUkernel hfunc );
CUresult cuKernelSetAttribute ( CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev );
CUresult cuKernelSetCacheConfig ( CUkernel kernel, CUfunc_cache config, CUdevice dev );
CUresult cuLibraryGetGlobal ( CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name );
CUresult cuLibraryGetKernel ( CUkernel* pKernel, CUlibrary library, const char* name );
CUresult cuLibraryGetManaged ( CUdeviceptr* dptr, size_t* bytes, CUlibrary library, const char* name );
CUresult cuLibraryGetModule ( CUmodule* pMod, CUlibrary library );
CUresult cuLibraryGetUnifiedFunction ( void** fptr, CUlibrary library, const char* symbol );
CUresult cuLibraryLoadData ( CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions );
CUresult cuLibraryLoadFromFile ( CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions );
CUresult cuLibraryUnload ( CUlibrary library );