cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jajce85
Journeyman III

radeon 4870x2 max # of work groups

Hi I was wondering is there a limit on the number of work groups you can specify to the graphics card?. I have tried running on radeon 4870x2 for one core only the following:

# of Work Items = 2;

# of Work Groups = 1024x1024;

1 dimensional array to kernel  size = 2x1024x1024x4 bytes

1 dimensional array to kernel output = 2x1024x1024x4 bytes

It gives me an error message, saying it ran out of memory.

0 Likes
7 Replies
genaganna
Journeyman III

Originally posted by: jajce85 Hi I was wondering is there a limit on the number of work groups you can specify to the graphics card?. I have tried running on radeon 4870x2 for one core only the following:

# of Work Items = 2;

# of Work Groups = 1024x1024;

1 dimensional array to kernel  size = 2x1024x1024x4 bytes

1 dimensional array to kernel output = 2x1024x1024x4 bytes

It gives me an error message, saying it ran out of memory.

There is no such limitation on number of workgroups. Which function call is giving this error. Please reduce the memory usage.

0 Likes

The function that is throwing the error is clCreateBuffer Message is:
"We dont have enough video memory!"

What is hadppening more exactly is the following:

Iam creating two buffers/arrays each with size 268435456/2 bytes. The call to clCreateBuffer is failing when I create the second array, first array is OK.

BTW why is the max CL_DEVICE_MAX_MEM_ALLOC_SIZE for Radeon 4870x2 only 268435456 bytes(for each core), I thought the card had 2GB of memory in total so would not make more sense for CL_DEVICE_MAX_MEM_ALLOC_SIZE to be 1GB for each device?

 

thanks

0 Likes
gapon
Journeyman III

Originally posted by: jajce85 The function that is throwing the error is clCreateBuffer Message is: "We dont have enough video memory!"

 

What is hadppening more exactly is the following:

 

Iam creating two buffers/arrays each with size 268435456/2 bytes. The call to clCreateBuffer is failing when I create the second array, first array is OK.

 

BTW why is the max CL_DEVICE_MAX_MEM_ALLOC_SIZE for Radeon 4870x2 only 268435456 bytes(for each core), I thought the card had 2GB of memory in total so would not make more sense for CL_DEVICE_MAX_MEM_ALLOC_SIZE to be 1GB for each device?

 

 

 

thanks

 

 

I too see the same effect with my HD5870 1 GB  It's installed in DELL T3400 (PCIe x16 version 1 ?).  

 

0 Likes
Fr4nz
Journeyman III

Originally posted by: jajce85 The function that is throwing the error is clCreateBuffer Message is: "We dont have enough video memory!"

 

What is hadppening more exactly is the following:

 

Iam creating two buffers/arrays each with size 268435456/2 bytes. The call to clCreateBuffer is failing when I create the second array, first array is OK.

 

BTW why is the max CL_DEVICE_MAX_MEM_ALLOC_SIZE for Radeon 4870x2 only 268435456 bytes(for each core), I thought the card had 2GB of memory in total so would not make more sense for CL_DEVICE_MAX_MEM_ALLOC_SIZE to be 1GB for each device?

 

 

thanks

 

For every buffer object you can allocate 1/4th of the total memory (this is dictated by OpenCL spec, it is not an ATI limitation). For example, if you have 1Gb of total memory you can allocate a maximum of 256Mbytes, if you have 2Gbytes you can allocate 512Mbytes, and so on.

0 Likes
jajce85
Journeyman III

Originally posted by: Fr4nz
Originally posted by: jajce85 The function that is throwing the error is clCreateBuffer Message is: "We dont have enough video memory!"

 

 

 

What is hadppening more exactly is the following:

 

 

 

Iam creating two buffers/arrays each with size 268435456/2 bytes. The call to clCreateBuffer is failing when I create the second array, first array is OK.

 

 

 

BTW why is the max CL_DEVICE_MAX_MEM_ALLOC_SIZE for Radeon 4870x2 only 268435456 bytes(for each core), I thought the card had 2GB of memory in total so would not make more sense for CL_DEVICE_MAX_MEM_ALLOC_SIZE to be 1GB for each device?

 

 

 

 

 

thanks

 

 

 

 

For every buffer object you can allocate 1/4th of the total memory (this is dictated by OpenCL spec, it is not an ATI limitation). For example, if you have 1Gb of total memory you can allocate a maximum of 256Mbytes, if you have 2Gbytes you can allocate 512Mbytes, and so on.

 

 

Ok but why can't I declare two buffers each with size 268435456/2 on readeon 4870x2 if thats the case. Since the max alloc size on the radeon 4870 is 268435456 for one core, i should be able to declare two arrays.

 

It is only when I decrease each size to about 100 MB that it  is ok with it.

 

Whats taking up the other space?

0 Likes

well try allocate this buffers before anythig elseright after creating context.

0 Likes

A quote from OpenCL spec:

CL_DEVICE_MAX_MEM_ALLOC_SIZE:
Max size of memory object allocation in bytes. The minimum value is max(1/4th of CL_DEVICE_GLOBAL_MEM_SIZE ,128*1024*1024)

i.e. the spec. does not dictate that a 1/4 of available memory be the maximum, but the minimum amount available.

I have found I can allocate more that what is specified by CL_DEVICE_MAX_MEM_ALLOC_SIZE anyway, so i'm not sure of the point of having it.

0 Likes