Skip to main content

hipModuleLoadData

Function hipModuleLoadData 

Source
pub unsafe extern "C" fn hipModuleLoadData(
    module: *mut hipModule_t,
    image: *const c_void,
) -> hipError_t
Expand description

@brief builds module from code object data which resides in host memory.

The “image” is a pointer to the location of code object data. This data can be either a single code object or a fat binary (fatbin), which serves as the entry point for loading and launching device-specific kernel executions.

By default, the following command generates a fatbin:

“amdclang++ -O3 -c –offload-device-only –offload-arch=<GPU_ARCH> <input_file> -o <output_file>”

For more details, refer to: Kernel Compilation in the HIP kernel language C++ support, or HIP runtime compilation (HIP RTC).

@param [in] image The pointer to the location of data @param [out] module Retuned module

@returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized