cuGraphicsEGLRegisterImage and cuGraphicsUnregisterResource are slow?

Please provide complete information as applicable to your setup.

• Platform: Nvidia Orin AGX 64 GB
• DeepStream Version 6.3
• JetPack Version: 35.4.1
• Issue Type: Question about performance

I have a custom gstreamer plugin that performs image warping of 1920x1080 images. I am following similar patterns to those in “gst-nvdewarper”. Each time the plugin receives an input image buffer it casts it as an NvBufSurface, then uses cuGraphicsEGLRegisterImage and cuGraphicsResourceGetMappedEglFrame to retrive a pointer to device memory that it can uses in a cuda kernel. When it is done, it relases the resource using cuGraphicsUnregisterResource. I have found through profiling that cuGraphicsEGLRegisterImage and cuGraphicsUnregisterResource are quite slow. For each image, registration can take up to 2 ms. I wonder if this is expected or if I am using cuGraphicsEGLRegisterImage incorrectly. Does this need to be called for every new input image or can this be done once and reused some how?

I met the same issue. I also tried to profile the register and unregister time. it has the same 2ms. How can I optimize this part?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

The cuGraphicsEGLRegisterImage and cuGraphicsResourceGetMappedEglFrame are used to get the CPU address of the EGL buffer. Is it possible for you to map the address once and reuse the buffers in cycle? Why did you need to use these APIs for every frame?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.