Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Adept II

zero copy and OpenCL 2.0 coarse-grain share virtual memory

Hi all,

I used to implement zero copy in AMD APUs using OpenCL 1.2, now since the OpenCL 2.0 is ready, what is the difference between zero copy and OpenCL 2.0's coarse grain shared virtual memory.

Is OpenCL 2.0's coarse grain shared virtual memory another form of zero copy?


2 Replies

yes it is more explicit form of zero copy. when you create normal buffer you can't be 100% sure if it is shared. with SVM you know that it is shared between host and device. another difference is that pointers can be shared between device and host.

My understanding is that with course grain SVM, they allocate a buffer on the GPU and a buffer on the CPU at the same virtual address. i.e. so the GPU and CPU see it at them at same addresses and all the pointers within it point at the correct spot.

When you do a sync it copies the relevant buffer across.

With zero copy the GPU reads directly from the CPU's memory. It maybe that course grain SVM uses a zero copy buffer by then it may not.

It may depend on whether the GPU is discrete or not. i.e. with an APU use a zero copy buffer, with a dGpu use separate buffers and copy them back and forth.

(me, I want to see a dGPU connected via Hyper Transport... or a really big APU in a multi socked motherboard.)