OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

Maximum memory for GEN is only 80 MB ?

Jonathan_H_4
Beginner
661 Views

Is the maximum size for OpenCL only 80 MB ?

First, CPU allocates the memory using aligned_malloc().
CPU then does some processing on the memory, then OpenCL kernel is executed on GEN GPU.
Before OpenCL execution on GEN, clCreateBuffer() is executed using CL_MEM_USE_HOST_PTR flag.
OpenCL kernel on GEN will do some stuff and write results on the memory, then CPU will postprocess the memory.

For some reason, if the memory allocated is more than around 80 MB, then the application does not execute properly.
Is there an inherent limitation of GPU memory ? Can't OpenCL on GEN GPU use more than 80 MB ? I checked that it is not algorithm problem, it's just that memory is not working properly.

Could you please let me know if there is this inherent limitation ? If yes, how I can bypass it ? I think that many applications are surely using more than 80 MB these days.

Thank you

PS. I'm using HSW processor on Windows 8.1, using visual studio 2012

0 Kudos
3 Replies
Robert_I_Intel
Employee
660 Views

Hi Jonathan,

Could you please specify exactly what HSW processor you have, your graphics driver version, whether you use 32-bit or 64-bit version of Windows? Also, please provide a small reproducer. If the code is sensitive, you can send me a private email.

80 MB shouldn't be a problem at all, especially given CL_MEM_USE_HOST_PTR flag. Is you buffer size a multiple of 64 bytes?

0 Kudos
Jonathan_H_4
Beginner
660 Views

Robert Ioffe (Intel) wrote:

Hi Jonathan,

Could you please specify exactly what HSW processor you have, your graphics driver version, whether you use 32-bit or 64-bit version of Windows? Also, please provide a small reproducer. If the code is sensitive, you can send me a private email.

80 MB shouldn't be a problem at all, especially given CL_MEM_USE_HOST_PTR flag. Is you buffer size a multiple of 64 bytes?

Let me reclairfy the question.  (HSW processor: i7-4790, 64-bit Windows Version)

80 MB surely works. What I want to do is allocate more than 100 MB or even 200 MB.


Here are my questions.

Q) What is the practical maximum amount of memory that I can allocate ? 
CL_MEM_USE_HOST_PTR means I allocate memory on CPU first using aligned_malloc(), where the maximum is close to actual physical memory.

However, when I use cl_createbuffer() with CL_MEM_USE_HOST_PTR.
This part confuses me. Does this part create a duplicate on GEN GPU memory , too ? 


Q) I want to allocate more than 200 MB using malloc.
And use CL_MEM_USE_HOST_PTR with clcreatebuffer(), so that GEN GPU can use that 200 MB , too.


Q) I remember seeing in one forum before (recently) that GEN only supports around 80 MB memory, is that true ? 

0 Kudos
Robert_I_Intel
Employee
660 Views

Use aligned malloc with 4096 byte alignment. Create a buffer from that memory and make sure the size of the buffer is a multiple of 64 bytes. The memory will be shared between CPU and GPU, no copy to the GPU. The limit is close to 1.6GB, so for buffers of your size things should work OK.

0 Kudos
Reply