NVIDIA/DALI

Dali on Jetson: nvidia.dali.fn.readers.video_resize is missing

antoinefaure opened this issue · 4 comments

Version

1.36.0

Describe the bug.

I'm trying to use Dali on a Jetson Orin NX 16GB using the Nvidia SDK.

First I have tried to install Dali using pip, by running pip install nvidia-dali-cuda110.
This leads to an NVML error:

dlopen libnvidia-ml.so failed!. Please install GPU dirver[/opt/dali/dali/util/nvml_wrap.cc:69] nvmlInitChecked failed: 
Traceback (most recent call last):
  File "yolo.py", line 80, in <module>
    input_batch_generator = DetectionBatchGenerator(
  File "/home/omnieye/.local/lib/python3.8/site-packages/omnieye/model_runtime/input_batch_generator.py", line 44, in __init__
    self._pipeline.build()
  File "/home/omnieye/.local/lib/python3.8/site-packages/nvidia/dali/pipeline.py", line 978, in build
    self._pipe.Build(self._generate_build_args())
RuntimeError: nvml error (13): Local version of NVML doesn't implement this function

After some research it seems that Dali needs to be compiled manually to run on Jetsons. I have followed the documentation, and compiled dali 1.33.0 using the provided docker image:

$ docker build -t nvidia/dali:builder_aarch64-linux -f docker/Dockerfile.build.aarch64-linux .

$ docker run -v $(pwd):/dali nvidia/dali:builder_aarch64-linux

I can then install the wheel on the device, but when doing so I end up with a different runtime error:

Traceback (most recent call last):
  File "yolo.py", line 80, in <module>
    input_batch_generator = DetectionBatchGenerator(
  File "/home/omnieye/.local/lib/python3.8/site-packages/omnieye/model_runtime/input_batch_generator.py", line 39, in __init__
    self._pipeline = create_detection_video_loading_pipeline(
  File "/home/omnieye/.local/lib/python3.8/site-packages/omnieye/model_runtime/input_data_loading.py", line 152, in create_detection_video_loading_pipeline
    video_pipeline: dali.Pipeline = _define_detection_video_pipeline(
  File "/home/omnieye/.local/lib/python3.8/site-packages/nvidia/dali/pipeline.py", line 1875, in create_pipeline
    _generate_graph(pipe, pipe_func, args, fn_kwargs)
  File "/home/omnieye/.local/lib/python3.8/site-packages/nvidia/dali/pipeline.py", line 1732, in _generate_graph
    pipe_outputs = func(*fn_args, **fn_kwargs)
  File "/home/omnieye/.local/lib/python3.8/site-packages/omnieye/model_runtime/input_data_loading.py", line 99, in _define_detection_video_pipeline
    video_batch = fn.readers.video_resize(
AttributeError: module 'nvidia.dali.fn.readers' has no attribute 'video_resize'

Minimum reproducible example

Install the wheel on the device
Run python, then `import nvidia.dali.fn.readers.video_resize`

Relevant log output

No response

Other/Misc.

No response

Check for duplicates

  • I have searched the open bugs/issues and have found no duplicates for this bug report

Hi @antoinefaure,

Thank you for reaching out.
Indeed the video reader operators family is not supported on the Jetson platform (same for GPU accelerated image decoding). DALI uses the Video SDK for discrete GPUs, while Jetson supports V4L API which is not supported by DALI.
We have this feature on our ToDo list but we cannot provide any ETA at the moment. In the mean time, I recommend trying DeepStream platform for the video on Jetson.

Hi @JanuszL,
Thanks for getting back to me and for the explanation.
Hopefully this will come someday soon, in the meantime I'll look into using DeepStream or even OpenCV.
Do you have any other features in mind that would not work on Jetson devices ?
Cheers

I think DeepStream should work very well as an end-to-end solution, and OpenCV should be convenient for experiments.

Thank you for your answers, they have been a valuable help.