Skip to main content

initFromImrModelFile

Description

Initialize object (obj) created by CreateArgoSDK function using integrated resource file

initFromImrModelFile()

bool initFromImrModelFile(void* obj, char* imrModelDataPath, char* name, bool isRecovery, bool isSelfCheck, int gpuCount, int engines_per_gpu[])
Parameters
Name Type Description
objvoid**

Object pointer created using CreateArgoSDK function

imrModelDataPathchar*

Initialization data file

namechar*

Name

isRecoverybool

Use recovery mode

isSelfCheckbool

Use self-check mode

gpuCountint

GPU count

Engines_per_gpuint[]

Set number of engines per GPU

Return Value

bool: Success or failure

Example

  • GPU usage example
  • Use 'all_module.24.12.03.gpu.imr' resource
std::string OBJ_NAME = "Sample";
bool IS_RECOVERY = true;
bool IS_SELF_CHECK = true;
int GPU_COUNT = 1;
Int ENGINES_PER_GPU[1] = {1};
Std::string IMR_MODEL_DATA_PATH = "../assets/all_module.24.12.03.gpu.imr";
bool isSuccess = initFromImrModelFile(obj,
(char *)IMR_MODEL_DATA_PATH.c_str(),
(char *)OBJ_NAME.c_str(),
IS_RECOVERY,
IS_SELF_CHECK,
GPU_COUNT,
ENGINES_PER_GPU);