cuda.bindings._v2.driver.func_get_module#

cuda.bindings._v2.driver.func_get_module(intptr_t hfunc) → intptr_t#

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 module_unload() on that module will result in undefined behavior.

Parameters:

hfunc (intptr_t) – Function to retrieve module for.

Returns:

Returned module handle.

Return type:

intptr_t

See also

cuFuncGetModule