After the model packet is installed on the target, all the models are stored under /usr/share/vitis_ai_library/models/. Each model is stored in a separate folder, which is composed of the following files by default.
- [model_name].elf
- [model_name].prototxt
Note: For alveo card, the model consists of [model_name].xmodel and [model_name].prototxt
Take the "inception_v1" model as an example. "inception_v1.elf" is the model data. "inception_v1.prototxt" is the parameter of the model.
Note:
- The name of the model directory should be the same with the model name
- If there are more than 1 elf file generated after you do the model compiling, such as sp_net model, you should merge all the elf files into 1 elf file. Run the following script to do the merging.
${CMAKE_CXX_COMPILER} \
-nostdlib \
-fPIC \
-shared \
${CMAKE_BINARY_DIR}/output_elf/${MODEL_NAME}/dpu_${MODEL_NAME}*.elf \
-o \
${CMAKE_BINARY_DIR}/$MODEL_NAME/${MODEL_NAME}.elf