What type of memory am I using with my code?

Hi

I am learning TensorRT and PyCUDA to do inference with the TX2.

I would like to know what type of memory I am using with my code?
I think it is the page-locked.

a) Traditional memory copy: mem_alloc (Python) = malloc (c)
b) page-locked memory
c) zero-copy
d) Unified management

Thank you




image

Hi,

It’s page-locked memory.
You can find more information in pyCUDA’s document here:
https://documen.tician.de/pycuda/driver.html#pagelocked-memory

Thanks.

1 Like

Thank you!

Is there a function for “zero-copy” for the TX2? I read that it is like: Pinned data transfer. Check the image.

Hi,

YES. You can use a pinned memory to avoid memory copy.
Some example can be found in our CUDA document:

Thanks.

1 Like

I guess there is nothing similar in PyCUDA, right?

Hi,

It should be similar since pyCUDA is wrapping from the C++ function.

Thanks.

1 Like