Thanks for you help. I tried your suggestion. It didn’t work on my computer with (2) RTX 2080 TIs. I tried some combinations and here are the results.
This is the config_infer_primary.yml:
property:
gpu-id: 0
net-scale-factor: 0.00392156862745098
#1 int8-calib-file: /project/deepstream/prod_model/dn2_rs18/calibration_qat.bin
#2 model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.trt.int8
#3 model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.etlt
#4 model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector.etlt
labelfile-path: /project/deepstream/prod_model/dn2_rs18/labels.txt
batch-size: 24
process-mode: 1
offsets: 0.0;0.0;0.0
infer-dims: 3;384;1248
tlt-model-key: (mykey)
network-type: 0
num-detected-classes: 3
uff-input-order: 0
output-blob-names: output_cov/Sigmoid;output_bbox/BiasAdd
uff-input-blob-name: input_1
model-color-format: 0
maintain-aspect-ratio: 0
So I tried with each of the 4 respective bin/engine files. I uncommented one of the 4 lines at a time.
case 1 – this would be equivalent to your suggestion of commenting out my *detector_qat.trt.int8
int8-calib-file: /project/deepstream/prod_model/dn2_rs18/calibration_qat.bin
0:00:00.165909648 1272 0x55c770a85b60 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:860 failed to build network since there is no model file matched.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:799 failed to build network.
0:00:00.895838689 1272 0x55c770a85b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 1]: build engine file failed
0:00:00.917822891 1272 0x55c770a85b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 1]: build backend context failed
0:00:00.917926592 1272 0x55c770a85b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 1]: generate backend failed, check config file settings
0:00:00.917948713 1272 0x55c770a85b60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:00.917954083 1272 0x55c770a85b60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Config file path: /project/deepstream/prod_model/dn2_rs18/config_infer_primary.yml, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
case 2:
model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.trt.int8
ERROR: [TRT]: 1: [stdArchiveReader.cpp::StdArchiveReader::40] Error Code 1: Serialization (Serialization assertion stdVersionRead == serializationVersion failed.Version tag does not match. Note: Current Version: 213, Serialized Engine Version: 205)
ERROR: [TRT]: 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1528 Deserialize engine failed from file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.trt.int8
0:00:00.908849557 1316 0x55e981636b60 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.trt.int8 failed
0:00:00.929464099 1316 0x55e981636b60 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.trt.int8 failed, try rebuild
0:00:00.929479429 1316 0x55e981636b60 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:860 failed to build network since there is no model file matched.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:799 failed to build network.
0:00:01.435991985 1316 0x55e981636b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 1]: build engine file failed
0:00:01.456876270 1316 0x55e981636b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 1]: build backend context failed
0:00:01.456897270 1316 0x55e981636b60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 1]: generate backend failed, check config file settings
0:00:01.456912820 1316 0x55e981636b60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:01.456916560 1316 0x55e981636b60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Config file path: /project/deepstream/prod_model/dn2_rs18/config_infer_primary.yml, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
case 3:
model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.etlt
ERROR: [TRT]: 1: [stdArchiveReader.cpp::StdArchiveReader::30] Error Code 1: Serialization (Serialization assertion magicTagRead == kMAGIC_TAG failed.Magic tag does not match)
ERROR: [TRT]: 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1528 Deserialize engine failed from file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.etlt
0:00:00.881359827 1357 0x55d48ed1dd60 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.etlt failed
0:00:00.902421478 1357 0x55d48ed1dd60 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector_qat.etlt failed, try rebuild
0:00:00.902436368 1357 0x55d48ed1dd60 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:860 failed to build network since there is no model file matched.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:799 failed to build network.
0:00:01.409074656 1357 0x55d48ed1dd60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 1]: build engine file failed
0:00:01.430537970 1357 0x55d48ed1dd60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 1]: build backend context failed
0:00:01.430557570 1357 0x55d48ed1dd60 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 1]: generate backend failed, check config file settings
0:00:01.430575600 1357 0x55d48ed1dd60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:01.430579741 1357 0x55d48ed1dd60 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Config file path: /project/deepstream/prod_model/dn2_rs18/config_infer_primary.yml, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
case 4:
model-engine-file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector.etlt
ERROR: [TRT]: 1: [stdArchiveReader.cpp::StdArchiveReader::30] Error Code 1: Serialization (Serialization assertion magicTagRead == kMAGIC_TAG failed.Magic tag does not match)
ERROR: [TRT]: 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:1528 Deserialize engine failed from file: /project/deepstream/prod_model/dn2_rs18/resnet18_detector.etlt
0:00:00.920260287 1394 0x5651c4fe9960 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 1]: deserialize engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector.etlt failed
0:00:00.941272524 1394 0x5651c4fe9960 WARN nvinfer gstnvinfer.cpp:643:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 1]: deserialize backend context from engine from file :/project/deepstream/prod_model/dn2_rs18/resnet18_detector.etlt failed, try rebuild
0:00:00.941287905 1394 0x5651c4fe9960 INFO nvinfer gstnvinfer.cpp:646:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 1]: Trying to create engine from model files
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:860 failed to build network since there is no model file matched.
ERROR: …/nvdsinfer/nvdsinfer_model_builder.cpp:799 failed to build network.
0:00:01.444696177 1394 0x5651c4fe9960 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1943> [UID = 1]: build engine file failed
0:00:01.465987467 1394 0x5651c4fe9960 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2029> [UID = 1]: build backend context failed
0:00:01.466005447 1394 0x5651c4fe9960 ERROR nvinfer gstnvinfer.cpp:640:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1266> [UID = 1]: generate backend failed, check config file settings
0:00:01.466022137 1394 0x5651c4fe9960 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:01.466025747 1394 0x5651c4fe9960 WARN nvinfer gstnvinfer.cpp:846:gst_nvinfer_start:<primary_gie> error: Config file path: /project/deepstream/prod_model/dn2_rs18/config_infer_primary.yml, NvDsInfer Error: NVDSINFER_CONFIG_FAILED