How can I figure out how much device (GPU) memory the TK1 has?

What is the size of GPU memory on the TK1? Or, does it share memory with the CPU? If it shares memory, does that mean there’s no need to copy between host and device?

I’ve read through the spec’s pages here

http://elinux.org/JetsonTK1

and here

I want to do some number crunching, and knowing how much space the device has is, obviously, an important first step.

On the Grinch 21.2.1 kernel and CUDA 6.5.34, cudaMemGetInfo() reports 1193 MB of free memory.

The Jetson board has 2GB of physical memory that is shared by the ARM CPU and the CUDA GPU.

I think that you will find that the Zero Copy access of the CUDA toolkit invaluable for any large amount of number crunching.

Here’s a good article on Zero Copy and the Jetson:

http://arrayfire.com/zero-copy-on-tegra-k1/

Does anybody know if OpenCV naturally uses Zero Copy when avaliable?
Id not, how can I modify my existing OpenCV GPU code to work with Zero Copy?
It goes something like this:

gpu::Mat src_gpu, dst_gpu
Mat src_host, dst_host
//..

src_gpu.Upload(src_host);
//Some gpu operations here
dst_gpu.Download(dst_host);

ZeroCopy is available on most discrete systems in addition to TK1 (the difference being on the discrete systems, the GPU transparently goes out over PCIe to access the memory in system RAM). Due to the latency from PCIe, ZeroCopy is only used in certain situations on discrete architectures. Hence OpenCV doesn’t automatically use ZeroCopy everytime it’s available.

You should be able to manually use the ALLOC_ZEROCOPY flag however
http://docs.opencv.org/modules/gpu/doc/data_structures.html#gpu-cudamem