I’m having some issues using managed memory with VPI: after wrapping the allocated managed memory, I think that Cuda sees the memory as host only. It return error as “invalid argument”
I would like to understand what is going on and I have prepared a small sample to reproduce the issue sample.zip (2.5 KB)
Some version info: Jetpack v4.6, CUDA v10.2, VPI v1.1
FYI, The same issue also occurs with our latest VPI 2.0.
We are checking this with our internal team now. Will share more information once we got feedback.
I was able to investigate further and the memory need to be reattached to global context or to the stream; tested with both sync and async copy, that seems to fix the issue; I can’t tell if then other VPI operation fails or unwanted copies are done from VPI; I might update this issue eventually.
I got a different issue that I forgot to mention, as you can see from the sample I try to avoid set the sizePointer of the VPIArrayData, because then the wrapping operation fails, is there any particular reason why that happen?
It is not a big issue but it would be nice to directly check the size without calls to the getter or lock-unlock the array.
After wrapping from the VPI, the buffer becomes CPU-accessible only.
A GPU access usually leads to an error or exception.
On Jetson, we don’t support concurrent access for a unified memory.
This indicates only one process (either CPU or GPU) can access the buffer per time.
We are discussing this issue with our internal team.
I will update you here with more information later.