cpp:680: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
WARNING: [TRT]: onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
SSA validation FAIL: tensor __mye97 has multiple definitions
peephole.cpp:657: DCHECK(g_->ssa_validation()) failed.
Aborted (core dumped)
I have adopted the configuration file you provided, but still report the same error. I think it may not be a problem with the configuration file. Here are all the files I used, please help to see if there is a problem.
lab@lab:/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-class$ deepstream-app -c ds_classification_as_primary_gie.txt
Warning: 'input-dims' parameter has been deprecated. Use 'infer-dims' instead.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvTrackerParams::getConfigRoot()] !!![WARNING] Empty config file path is provided. Will go ahead with default values
[NvMultiObjectTracker] Initialized
0:00:00.108288222 28822 0x561b18c25720 INFO nvinfer gstnvinfer.cpp:680: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
WARNING: [TRT]: onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
SSA validation FAIL: tensor __mye53 has multiple definitions
peephole.cpp:657: DCHECK(g_->ssa_validation()) failed.
Aborted (core dumped)
I tried and got the same error, is there a problem with my model file?
root@9a392fcbd0cb:/opt/nvidia/deepstream/deepstream-6.2# cd /model/
root@9a392fcbd0cb:/model# ls
classification_model_export.onnx ds_classification_as_primary_gie.txt
config_as_primary_gie.txt ds_config.txt
config_infer_primary.txt labels.txt
root@9a392fcbd0cb:/model# deepstream-app -c ds_classification_as_primary_gie.txt
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.411: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.503: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so': libmpg123.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.508: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2dec.so': libmpeg2.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.512: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2enc.so': libmpeg2encpp-2.1.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.535: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpg123.so': libmpg123.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:119): GStreamer-WARNING **: 01:54:35.539: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstchromaprint.so': libavcodec.so.58: cannot open shared object file: No such file or directory
Warning: 'input-dims' parameter has been deprecated. Use 'infer-dims' instead.
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvTrackerParams::getConfigRoot()] !!![WARNING] Empty config file path is provided. Will go ahead with default values
[NvMultiObjectTracker] Initialized
0:00:00.701462433 118 0x5618dfa85ed0 INFO nvinfer gstnvinfer.cpp:680: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
WARNING: [TRT]: onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
WARNING: [TRT]: onnx2trt_utils.cpp:403: One or more weights outside the range of INT32 was clamped
SSA validation FAIL: tensor __mye53 has multiple definitions
peephole.cpp:657: DCHECK(g_->ssa_validation()) failed.
Aborted (core dumped)
I was prompted with the following information when exporting the model with tao, does this matter?
2023-09-04 05:34:25,669 - mmcls - INFO - ********************** Start logging for Export **********************
load checkpoint from local path: /tmp/tmph7dwtz6c.pth
/usr/local/lib/python3.8/dist-packages/mmcv/onnx/symbolic.py:481: UserWarning: DeprecationWarning: This function will be deprecated in future. Welcome to use the unified model deployment toolbox MMDeploy: https://github.com/open-mmlab/mmdeploy
warnings.warn(msg)
/usr/local/lib/python3.8/dist-packages/nvidia_tao_pytorch/cv/classification/models/fan.py:231: UserWarning: Replacing default adatpive_avg_pool2d to custom implementation for ONNX export
warnings.warn("Replacing default adatpive_avg_pool2d to custom implementation for ONNX export")
/usr/local/lib/python3.8/dist-packages/nvidia_tao_pytorch/cv/backbone/fan.py:603: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
kernel_width = math.ceil(inp_size[2] / size[0])
/usr/local/lib/python3.8/dist-packages/nvidia_tao_pytorch/cv/backbone/fan.py:604: TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
kernel_height = math.ceil(inp_size[3] / size[1])
/usr/local/lib/python3.8/dist-packages/nvidia_tao_pytorch/cv/classification/models/fan.py:255: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
attn = attn.repeat_interleave(repeat_time, dim=-1) if attn.shape[-1] > 1 else attn
========== Diagnostic Run torch.onnx.export version 1.14.0a0+44dac51 ===========
verbose: False, log level: Level.ERROR
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================
2023-09-04 05:34:29,824 - mmcls - INFO - Successfully exported ONNX model: /results/classification_experiment/export/classification_model_export.onnx
Execution status: PASS
2023-09-04 13:34:44,732 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 337: Stopping container.
yeah, I can confirm that inference is possible on the notebook, here is my inference log and results.
2023-08-31 15:49:51,432 [TAO Toolkit] [INFO] root 160: Registry: ['nvcr.io']
2023-08-31 15:49:51,470 [TAO Toolkit] [INFO] nvidia_tao_cli.components.instance_handler.local_instance 360: Running command in container: nvcr.io/nvidia/tao/tao-toolkit:5.0.0-pyt
2023-08-31 15:49:51,485 [TAO Toolkit] [WARNING] nvidia_tao_cli.components.docker_handler.docker_handler 262:
Docker will run the commands as root. If you would like to retain your
local host permissions, please add the "user":"UID:GID" in the
DockerOptions portion of the "/home/lab/.tao_mounts.json" file. You can obtain your
users UID and GID by using the "id -u" and "id -g" commands on the
terminal.
2023-08-31 15:49:51,485 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 275: Printing tty value True
/usr/local/lib/python3.8/dist-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
INFO: Created a temporary directory at /tmp/tmp8l1wbqmb
INFO: Writing /tmp/tmp8l1wbqmb/_remote_module_non_scriptable.py
/usr/local/lib/python3.8/dist-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
INFO: Created a temporary directory at /tmp/tmpwn0rgiwk
INFO: Writing /tmp/tmpwn0rgiwk/_remote_module_non_scriptable.py
sys:1: UserWarning:
'test_cats_dogs.yaml' is validated against ConfigStore schema with the same name.
This behavior is deprecated in Hydra 1.1 and will be removed in Hydra 1.2.
See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/automatic_schema_matching for migration instructions.
<frozen core.hydra.hydra_runner>:107: UserWarning:
'test_cats_dogs.yaml' is validated against ConfigStore schema with the same name.
This behavior is deprecated in Hydra 1.1 and will be removed in Hydra 1.2.
See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/automatic_schema_matching for migration instructions.
/usr/local/lib/python3.8/dist-packages/hydra/_internal/hydra.py:119: UserWarning: Future Hydra versions will no longer change working directory at job runtime by default.
See https://hydra.cc/docs/next/upgrades/1.1_to_1.2/changes_to_job_working_dir/ for more information.
ret = run_job(
<frozen core.loggers.api_logging>:245: UserWarning: Log file already exists at /results/classification_experiment/inference/status.json
Starting Classification inference
2023-08-31 07:49:59,867 - mmcls - INFO - **********************Start logging for Evaluation**********************
fatal: not a git repository: /opt/nvidia/tools/../.git/modules/tao-converter
load checkpoint from local path: /tmp/tmp9q2unozw.pth
[ ] 0/1601, elapsed: 0s, ETA:/usr/local/lib/python3.8/dist-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
INFO: Created a temporary directory at /tmp/tmpsm57p1sj
INFO: Writing /tmp/tmpsm57p1sj/_remote_module_non_scriptable.py
/usr/local/lib/python3.8/dist-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
INFO: Created a temporary directory at /tmp/tmp8r9f6lx4
INFO: Writing /tmp/tmp8r9f6lx4/_remote_module_non_scriptable.py
[>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1601/1601, 59.9 task/s, elapsed: 27s, ETA: 0s2023-08-31 07:50:28,077 - mmcls - INFO - The inference result is saved at: /results/classification_experiment/inference/result.csv
Execution status: PASS
2023-08-31 15:52:56,811 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 337: Stopping container.