Host code cannot access memory shared using EGL stream

Hello,

We are having issue accessing memory (from host code) that is shared to cuda consumer over EGL stream.

Setup:
We have two applications.
App-1 allocates memory using cudaHostAlloc. Then it connects to EGL stream created by App-2 using EGL stream File Descriptor. (From EGL stream context, App-1 is cuda producer and App-2 is cuda consumer)

App-1 shares its memory with App-2 by sending EGL frame to App-2. App-2 is able to extract the shared memory from the EGL stream and use it readily in its device code.
Now we also have some use cases where we would like to access the shared memory in App-2 from host code. Because the memory was allocated by App-1 using cudaHostAlloc() (and accessible from host code in App-1), we thought it would be accessible by host code in App-2 as well. But it’s not. Currently we are forced to do cudaMemcpy() and we would like to avoid that.

Hope there is a solution for this.

Thanks,
Rohit

Hi,
Please share a test code so that we can reproduce it and check further. EGL stream producer/consumer should work to share frames between processes. Your usecase looks advanced and we need to reproduce it and check with our teams.