cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ebaron
Journeyman III

Zero-copy with pre-allocated memory

on Fusion APU

Hi,

I'm experimenting with an E-350 APU and trying to minimize any CPU -> GPU transfer time. From Chapter 4 of the programming guide, I see zero-copy access is possible using CL_MEM_ALLOC_HOST_PTR. This will allow me to create a buffer that the device can access without copying, but in my case I have data already in memory and I would have to copy it to this zero-copy buffer.

Is there any way to create a buffer using an existing host pointer, such as with CL_MEM_USE_HOST_PTR, and have the OpenCL runtime pin the pages from this buffer and make them usable by the device?

Thanks,

Elliott

0 Likes
3 Replies
himanshu_gautam
Grandmaster

AFAIK, you will have to copy data atleast once from host_buffer to mapped region, so it is available to both CPU & GPU.

0 Likes

Thanks for the response. I'm curious if not being able to access pre-allocatted host memory directly on the device is a hardware constraint or software limitation. It seems to me that with an architecture like Fusion, this should be possible.

0 Likes

It is a hardware constraint for atleast the discrete GPU systems. I am not very familiar with fusion architecture but AFAIK GPU is not able to access complete RAM. Maybe someone else can answer the scenario of fusion in a better way. 

0 Likes