Skip to main content

cuFuncGetModule

Function cuFuncGetModule 

Source
pub unsafe extern "C" fn cuFuncGetModule(
    hmod: *mut CUmodule,
    hfunc: CUfunction,
) -> CUresult
Expand description

Returns a module handle.

Returns in *hmod the handle of the module that function hfunc is located in. The lifetime of the module corresponds to the lifetime of the context it was loaded in or until the module is explicitly unloaded.

The CUDA runtime manages its own modules loaded into the primary context. If the handle returned by this API refers to a module loaded by the CUDA runtime, calling cuModuleUnload on that module will result in undefined behavior.

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

§Parameters

  • hmod: Returned module handle.
  • hfunc: Function to retrieve module for.

§Return value