pub unsafe extern "C" fn cuModuleLoad(
module: *mut CUmodule,
fname: *const c_char,
) -> CUresultExpand description
Loads a compute module.
Takes a filename fname and loads the corresponding module module into the current context. The CUDA driver API does not attempt to lazily allocate the resources needed by a module; if the memory for functions and data (constant and global) needed by the module cannot be allocated, cuModuleLoad fails. The file should be a cubin file as output by nvcc, or a PTX file either as output by nvcc or handwritten, or a fatbin file as output by nvcc from toolchain 4.0 or later, or a Tile IR file.
Note that this function may also return error codes from previous, asynchronous launches.
§Parameters
module: Returned module.fname: Filename of module to load.
§Return value
CUresult::CUDA_SUCCESSCUresult::CUDA_ERROR_DEINITIALIZEDCUresult::CUDA_ERROR_NOT_INITIALIZEDCUresult::CUDA_ERROR_INVALID_CONTEXTCUresult::CUDA_ERROR_INVALID_VALUECUresult::CUDA_ERROR_INVALID_PTXCUresult::CUDA_ERROR_UNSUPPORTED_PTX_VERSIONCUresult::CUDA_ERROR_NOT_FOUNDCUresult::CUDA_ERROR_OUT_OF_MEMORYCUresult::CUDA_ERROR_FILE_NOT_FOUNDCUresult::CUDA_ERROR_NO_BINARY_FOR_GPUCUresult::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUNDCUresult::CUDA_ERROR_SHARED_OBJECT_INIT_FAILEDCUresult::CUDA_ERROR_JIT_COMPILER_NOT_FOUND
See also: cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetTexRef, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary, cuModuleUnload.