Is cuMemExportToShareableHandle available on the Nano with CUDA 10.2?

Is it possible to share CUDA memory between processes on the Jetson Nano? I’m using Cuda 10.2. I was hoping I could call cudaMalloc, fill it with some data with cudaMemcpy and then make this allocation available in another process using cuMemExportToShareableHandle and cuMemImportFromShareableHandle.

When I try this I get CUDA_ERROR_NOT_SUPPORTED as an error code. I’m not sure if that means I’ve set something up incorrectly, or if the operation is completely not supported in any way.

I saw a note here that says:

  • Since CUDA 11.5, only events-sharing IPC APIs are supported on L4T and embedded Linux Tegra devices with compute capability 7.x and higher. The memory-sharing IPC APIs are still not supported on Tegra platforms. EGLStream, NvSci, or the cuMemExportToShareableHandle() / cuMemImportFromShareableHandle() APIs can be used to communicate between CUDA contexts in two processes.

But I’m having trouble interpreting this note. It seems to say that cuMemExportToShareableHandle can be used to communicate between CUDA contexts in two processes.

So can cuMemExportToShareableHandle be used on the Nano with Cuda 10.2 or not?

Hi,

(Please note that the below comment is for Jetson Nano. Other platforms may be different.)
Unfortunately, Jetson’s CUDA buffer cannot be shared between processes.

This is because the CUDA context on Jetson is created per process.
So it is not possible for different processes to share the context.

For Jetson, you can try EGLStream as below:

Thanks.

So the part where it says cuMemExportToShareableHandle() / cuMemImportFromShareableHandle() APIs can be used to communicate between CUDA contexts in two processes.” is that an error? I feel like it’s the exact opposite of what you just said. Does the documentation need to be corrected?

Hi,

Sorry for the nonclear statement.

The support is added from CUDA 11, which is integrated into the JetPack 5.0.
However, JetPack 5.0 doesn’t support Nano.

Thanks.

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