Skip to main content

CreateFromImrModelFile

Description

API that creates and initializes 'ArgoEngineApi' object using integrated resource file

CreateFromImrModelFile()

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

Pointer to pointer for passing pointer after creating 'ArgoEngineApi' object

licensePathchar*

License file

engineLibDirPathchar*

Path where engine module libraries are located

imrModelDataPathchar*

Initialization data file

namechar*

Name

isRecoverybool

Use recovery mode

isSelfCheckbool

Use self-check mode

gpuCountint

GPU count

Engines_per_gpuint[]

Number of engines per GPU

Return Value

bool: Success or failure

Example

  • CPU usage example
  • Use '../libs/GPU/modulelibs' library, use 'all_module.24.12.03.gpu.imr' resource
std::string LICENSE_PATH = "../assets/sample.250630.license";
std::string ENGINE_LIB_PATH = "../libs/GPU/modulelibs";
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";
void *obj = nullptr;
bool isSuccess = CreateFromImrModelFile(&obj,
(char *)LICENSE_PATH.c_str(),
(char *)ENGINE_LIB_PATH.c_str(),
(char *)IMR_MODEL_DATA_PATH.c_str(),
(char *)OBJ_NAME.c_str(),
IS_RECOVERY,
IS_SELF_CHECK,
GPU_COUNT,
ENGINES_PER_GPU);