Please provide the following info (tick the boxes after creating this topic): Software Version
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other
Target Operating System
Linux
QNX
other
Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other
SDK Manager Version
1.9.2.10884
other
Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other
I would like to know if the APIs part of the Virtual Memory Management group are available on the DRIVE AGX Orin, more specifically the API pair cuMemImportFromShareableHandle / cuMemExportToShareableHandle.
I am currently trying them out and if the handle is imported either in the same process or in a different one the cuMemImportFromShareableHandle returns 101 or CUDA_ERROR_INVALID_DEVICE.
Dear @moises.jimenez ,
I can see these APIs are used in /usr/local/cuda-11.4/samples/0_Simple/memMapIPCDrv and I could run this sample on DRIVE AGX ORIN . Could you take a look?
@SivaRamaKrishnaNV thanks! Ive started two instances of the sample (one with some input arguments and one with none) and they are running but not sure what the expected behavior is. I also dont find documentation on how to use the sample here.
As far as I know, running one instance of the memMapIPCDrv sample will spawn multiple processes to demonstrate the use of CUDA IPC. To understand what it does, I suggest looking into the sample’s source code.
Ive gone through the code for the sample and tried to replicate the IPC communication in a simplified setup but am struggling with it. I have a single process where I do the following
Initialize the CUDA driver (cuInit)
Allocate memory (cuMemCreate)
Export that handle (cuMemExportToShareableHandle)
Every call up to now returns CUDA_SUCCESS
I then immediately try to import that shareable handle using cuMemImportFromShareableHandle into a new CUmemGenericAllocationHandle and this is where I hit the roadblock and the call returns CUDA_ERROR_INVALID_DEVICE. I have confirmed that the memMapIPCDrv sample runs as expected on the board. Are there some necessary missing steps to be able to import a handle?
I understand that you are trying to import a shareable handle using cuMemImportFromShareableHandle, but the function is returning CUDA_ERROR_INVALID_DEVICE. I suggest you take a closer look at the sample code and try to replicate the steps there. Additionally, I would like to point out that the API documentation does not mention that the function will return CUDA_ERROR_INVALID_DEVICE, so there might be something else going on.