English 中文(简体)
Error: Running nvidia deepstream 5.0 SDK on Ubuntu
原标题:

Trying to run nvidia s deepstream5.0 sdk (sample program) on ubuntu 18.04 by following the document (https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html).

The application is installed in the path: "/opt/nvidia/deepstream/deepstream-5.0/".

The execution command is "deepstream-app -c <config file>"

Example:

"deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt"

However,got the run-time error. The error report is given below.

amarnath@amarnath-Precision-T3610:/opt$ deepstream-app -c /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:1408 Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/../../models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine open error
0:00:00.324481231 31390 0x564e46ff5ea0 WARN                 nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1566> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/../../models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine failed
0:00:00.324517060 31390 0x564e46ff5ea0 WARN                 nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1673> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/../../models/Primary_Detector/resnet10.caffemodel_b30_gpu0_int8.engine failed, try rebuild
0:00:00.324530469 31390 0x564e46ff5ea0 INFO                 nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1591> [UID = 1]: Trying to create engine from model files
WARNING: ../nvdsinfer/nvdsinfer_model_builder.cpp:1163 INT8 not supported by platform. Trying FP16 mode.
WARNING: ../nvdsinfer/nvdsinfer_model_builder.cpp:1177 FP16 not supported by platform. Using FP32 mode.
WARNING: ../nvdsinfer/nvdsinfer_func_utils.cpp:34 [TRT]: TensorRT was linked against cuDNN 7.6.4 but loaded cuDNN 7.6.3
INFO: ../nvdsinfer/nvdsinfer_func_utils.cpp:37 [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: ../nvdsinfer/nvdsinfer_func_utils.cpp:37 [TRT]: Detected 1 inputs and 2 output network tensors.
WARNING: ../nvdsinfer/nvdsinfer_func_utils.cpp:34 [TRT]: TensorRT was linked against cuDNN 7.6.4 but loaded cuDNN 7.6.3
0:00:04.170021642 31390 0x564e46ff5ea0 INFO                 nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1624> [UID = 1]: serialize cuda engine to file: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector/resnet10.caffemodel_b30_gpu0_fp32.engine successfully
WARNING: ../nvdsinfer/nvdsinfer_func_utils.cpp:34 [TRT]: TensorRT was linked against cuDNN 7.6.4 but loaded cuDNN 7.6.3
WARNING: ../nvdsinfer/nvdsinfer_func_utils.cpp:34 [TRT]: Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:685 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:00:04.175528889 31390 0x564e46ff5ea0 INFO                 nvinfer gstnvinfer_impl.cpp:311:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/config_infer_primary.txt sucessfully

Runtime commands:
    h: Print this help
    q: Quit

    p: Pause
    r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.

** INFO: <bus_callback:181>: Pipeline ready

ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.432182851 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR from primary_gie: Failed to queue input batch for inferencing
Debug info: gstnvinfer.cpp(1188): gst_nvinfer_input_queue_loop (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
Quitting
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.476620553 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.541993813 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.608814180 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR from primary_gie: Failed to queue input batch for inferencing
Debug info: gstnvinfer.cpp(1188): gst_nvinfer_input_queue_loop (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
ERROR from primary_gie: Failed to queue input batch for inferencing
Debug info: gstnvinfer.cpp(1188): gst_nvinfer_input_queue_loop (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
ERROR from primary_gie: Failed to queue input batch for inferencing
Debug info: gstnvinfer.cpp(1188): gst_nvinfer_input_queue_loop (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.774548068 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.778180781 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: engine.cpp (418) - Cuda Error in enqueueInternal: 209 (no kernel image is available for execution on the device)
ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: FAILED_EXECUTION: std::exception
ERROR: nvdsinfer_backend.cpp:290 Failed to enqueue inference batch
ERROR: nvdsinfer_context_impl.cpp:1408 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:04.848116827 31390 0x564e400e0b20 WARN                 nvinfer gstnvinfer.cpp:1188:gst_nvinfer_input_queue_loop:<primary_gie> error: Failed to queue input batch for inferencing
App run failed

The output screen:

enter image description here

My nvidia driver and cuda version shown below:

enter image description here

Any help is appreciated.

问题回答

For the original question, the config files have relative file paths so you need to change your shell working directory to the location of the config file.

For the second question by Krunal, review the /opt/nvidia/deepstream/deepstream/samples/configs/tlt_pretrained_models/README which contains commands to run to download the model files. Also be sure to execute deepstream-app from that tlt_pretrained_models directory since the config files contain relative paths.

I also had that blank deepstream 5.0 screen . In my case the problem was solved by updating the driver NVIDIA driver 440.64 to NVIDIA driver 450.51 .

Anyway, to evade burning up in dependency hell, just simply pull the DeepStream SDK docker container image and run it with nvidia-docker installed in your host machine :

https://ngc.nvidia.com/catalog/containers/nvidia:deepstream

UPDATE

the nvcr.io/nvidia/deepstream:5.0-20.07-devel container works even with older versions of nvidia driver : i successfully tested the samples with NVIDIA driver 440.95.01 in my ubuntu - GTX 1050 laptop .

Deepstream 5.0 GA is meant to run with JetPack 4.4, which includes CUDA 10.2, TensorRT 7.1 and cuDNN 8.0. You re getting cuDNN version mismatch warning as well. Try using NVIDIA SDK Manager (as horrible as it is) to install the correct environment, after removing your current CUDA setup. You can skip the Target Components if you want it to be installed on your machine only. It is also worth updating your driver to the latest available, as mentioned by @Fizmath.

OKAY!!!

try:

sudo apt-get install nvidia-prime -y
echo "installed prime"
sudo prime-select nvidia
reboot

run deepstream and enjoy ? ..

output: enter image description here

tested on both GTX,RTX dgpus





相关问题
NVidia videocards - getting statistic

i need to write few applications about lowlevel videocard controling for my coursework. For example - temperature, working SM s, managing access to them, etc. OS linux, tesla c1060. Could you give me ...

nvidia cuda using all cores of the machine

I was running cuda program on a machine which has cpu with four cores, how is it possible to change cuda c program to use all four cores and all gpu s available? I mean my program also does things ...

creating arrays in nvidia cuda kernel

hi I just wanted to know whether it is possible to do the following inside the nvidia cuda kernel __global__ void compute(long *c1, long size, ...) { ... long d[1000]; ... } or the following ...

Calculate the angle between two triangles in CUDA

I wanted to calculate the angle between two triangles in 3D space. The two triangles will always share exactly two points. e.g. Triangle 1: Point1 (x1, y1, z1), Point2 (x2, y2, z2), Point3 (...

How do I see the commands that are run by GNU make?

I m trying to debug a complex Makefile. How do you get GNU make to print all the commands it runs? I couldn t find the answer in the man page (using the -d flag doesn t seem to print it). (This isn t ...

glDrawElements flicker and crash

I m getting a fishy error when using glDrawElements(). I m trying to render simple primitives (mainly rectangles) to speed up drawing of text and so forth, but when I call glDrawElements() the WHOLE ...

热门标签