• Hardware Platform (Jetson Orin NX) • DeepStream Version 6.3 • JetPack Version 5.1.2 [L4T 35.4.1]
• Issue Type(questions, bugs)
I’ve raised this issue on the DeepStream Forum and was directed here.
I am trying to utilize VPI for efficient image operations within a DeepStream pipeline using Python. However, there are very limited resources available on how to achieve this.
I attempted to replicate the C code in Python, referencing Paul Bridger’s post to work with the NvBufSurface C struct in Python. The overall process I implemented was: GStreamer buffer → CUDA EGL frame → CuPy array → VPI Image.
While I was able to obtain the VPI Image, I encountered an issue where calling cudart.cudaGraphicsUnregisterResource(graphics_resources) resulted in a cudaErrorIllegalAddress error after the pipeline ran for some time.
How can I resolve the illegal memory access error?
It seems that you try to wrap the cupy array into a VPI image.
Could you help to verify if “GStreamer buffer → CUDA EGL frame → CuPy array” can work?
If the cudart.cudaGraphicsUnregisterResource(graphics_resources) can work correctly if not wrapped into VPI?
For CuPy ↔ VPI, please find the below topic for more info:
Yes, my goal is to convert a GStreamer buffer to a VPI Image. I am trying to wrap the CuPy array into a VPI Image because I could only find examples that convert a GStreamer buffer to a CuPy array without memory copying. Are there any other recommended ways of achieving this in Python?
“GStreamer buffer → CUDA EGL frame → CuPy array” works, and I am also able to wrap it into a VPI Image and perform rescaling with VPI.
We are going to check this issue with the source in the GitHub you shared above.
Have you also tested this issue with the latest VPI 3.2 in the JetPack 6.2?
I am still encountering the same error even after adding del vpi_image, output. Additionally, the results seem inconsistent. Sometimes, the pipeline completes successfully (even without adding del vpi_image, output) even when inputs are same.