cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

roddomi
Journeyman III

Maximum UAV width in calResAllocLocal1D

Hi,

I need to allocate a large UAV using calResAllocLocal1D with CAL_FORMAT_UNSIGNED_INT32_1 format. This is the only UAV in my application. What is the maximum width I can allocate? Is the width given in bytes or in units of UNSIGNED_INT32_1 (i.e. four bytes)? My card is an HD5870 and according to CLInfo:

Max memory allocation:                         268435456

Is this the maximum width I can pass to calResAllocLocal1D (256 MB)?

Thank you.

0 Likes
4 Replies
roddomi
Journeyman III

Hello?

0 Likes
genaganna
Journeyman III

Originally posted by: roddomi Hi,

 

I need to allocate a large UAV using calResAllocLocal1D with CAL_FORMAT_UNSIGNED_INT32_1 format. This is the only UAV in my application. What is the maximum width I can allocate?

256MB

Is the width given in bytes or in units of UNSIGNED_INT32_1 (i.e. four bytes)?

units of your format

 

0 Likes

Wow... just when I had given up any hope on getting a reply!

In that case, the maximum width should be 67,108,864 (64 MB = 256MB / 4 B).

Thank you.

0 Likes

Hmm, not strictly correct. OpenCL limits allocations so it can play nice with other GPU APIs. CAL doesn't, since the allocations are the same as used by other APIs.

In other words, in CAL you should be able to allocate up to a maximum of your available memory on the GPU (minus whatever is already in use).

0 Likes