cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Raistmer
Adept II

Pinned memory allocation failed when allocated GPU memory exceeded 128M

why pinned memory allocation failed, not GPU buffer one?...


After execution of this string:
power_range=clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR, sizeof(cl_float)*fft_len/2*state.dm_chunk_small*2*DATA_CHUNK_UNROLL, NULL, &err);
if(err)fprintf(stderr,"ERROR: clCreateBuffer(power_range):%d\n",err);

I recived "-4" error, buffer allocation failed.
Requested size was 64 MB.

1) What current limit for pinned memory allocation?
2) Does pinned memory request results in GPU memory allocation too?
0 Likes
7 Replies

Long time ago for CAL pinned memory limit was 16M for WindowsXP and 64M for Windows Vista. And this is overall limit, i.e. the sum of all allocated pinned memory.

I have no idea was it increased with OpenCL release or not.

0 Likes
Raistmer
Adept II

Thanks! I ran it under Vista so perhaps encountered this limit of 64MB indeed.
0 Likes
Raistmer
Adept II

Did code revision - my "pinned" memory request was only 14MB, not 64 as I thought.
But total memory requested from OpenCL runtime was >128MB.
So, does it mean that runtime indeed took attempt to shadow memory allocated with CL_MEM_ALLOC_HOST_PTR to GPU and failed to do this (because of 128M limitation for HD4xxx cards) ??

That is, big question arise : is it possible to allocate (via OpenCL of course) memory buffer in host memory only and how to do this ?
0 Likes

Originally posted by: Raistmer Did code revision - my "pinned" memory request was only 14MB, not 64 as I thought. But total memory requested from OpenCL runtime was >128MB. So, does it mean that runtime indeed took attempt to shadow memory allocated with CL_MEM_ALLOC_HOST_PTR to GPU and failed to do this (because of 128M limitation for HD4xxx cards) ??

Yes.

That is, big question arise : is it possible to allocate (via OpenCL of course) memory buffer in host memory only and how to do this ?



What do u mean by 'in host memory only'? CL_MEM_ALLOC_HOST_PTR allocates the memory in host memory.

0 Likes


What do u mean by 'in host memory only'? CL_MEM_ALLOC_HOST_PTR allocates the memory in host memory.



Well, you answered "yes" on question where I supposed that buffer, created with CL_MEM_ALLOC_HOST_PTR will be shadowed into GPU memory too.
That is, 2 memory regions will be allocated, one in host memory, second - in GPU memory (silently, by runtime).
My question is:
is it possible to avoid GPU buffer creation? That is, to allocate buffer only in host memory.
0 Likes

 is it possible to avoid GPU buffer creation? That is, to allocate buffer only in host memory.


Presently, no.

0 Likes

There are many approaches to read from an array using multiple arrays or one dimensional array. The same can be done by 2 dimensional arrays also. But the area to be concentrated is the overflowing area. Overflowing is the process that occurs when they entered details exceed the array size or memory. The one way by which this can be avoided is by expanding the memory location or the array size. Else the problems like   exceeding of memory location happen.

0 Likes