Device vs host memory with buffers

Discussion created by omion on Dec 27, 2009
Latest reply on Dec 28, 2009 by omion

I just started looking into OpenCL with my brand new HD5850, but I ran into a bit of a problem:

I have a context which includes both the CPU and GPU, but any buffers I create seem to be limited to the available GPU memory. My computer has 8GB RAM. OpenCL sees 1GB usable on the CPU and 256MB usable on the GPU. Once I try to allocate more than about 256MB of buffers, I get a message on stderr:


C:\openclmainline\runtime\src\device\gpu\gpudevice.cpp:754: guarantee(!"We don't have enough video memory!")

Then the whole program crashes. (That file doesn't exist, by the way - I assume the message is a placeholder in the source for the OpenCL driver.)

Shouldn't the buffers be allocated on the host and only need to be on the GPU when it is using them? I kind of figured the driver would do all the memory swapping dynamically and automatically. Is this a function of the OpenCL spec or just of AMD's current implementation? If the latter, is there a fix planned?