Skip to main content

cuModuleUnload

Function cuModuleUnload 

Source
pub unsafe extern "C" fn cuModuleUnload(hmod: CUmodule) -> CUresult
Expand description

Unloads a module.

Unloads a module hmod from the current context. Attempting to unload a module which was obtained from the Library Management API such as cuLibraryGetModule will return cudaError_enum::CUDA_ERROR_NOT_PERMITTED.

Note that this function may also return error codes from previous, asynchronous launches.

Note: Use of the handle after this call is undefined behavior.

§Parameters

  • hmod: Module to unload

§Return value

See also: cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetTexRef, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary.