cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Raistmer
Adept II

Why on HD4870 with 512 MB onboard RAM only 128 available to OpenCL ???

Hm, actually I don't wonder much why that hackish env variable doesn't work in new SDK. I wonder why new SDK still have limit of 128MB for memory usage for 4870 GPU!
0 Likes
nou
Exemplar

Why on HD4870 with 512 MB onboard RAM only 128 available to OpenCL ???

i just found this thread http://www.khronos.org/message_boards/viewtopic.php?p=7321#p7321

The device memory can be viewed as just a cache where only memory objects needed by a command(s) executing on a device need to be allocated. This way, the actual amount of physical memory available on the device does not limit how many memory object you can create - it only limits the amount of memory needed by memory objects used by a command.


this is true when you have CPU only context. i succsefuly allocate more memory objects than reports CL_DEVICE_GLOBAL_MEM_SIZE.

but it fail with GPU only or mix context where it faild when i try allocate more than is device memory. so it is BUG.

0 Likes
Raistmer
Adept II

Why on HD4870 with 512 MB onboard RAM only 128 available to OpenCL ???

Hm, this feature can be viewed as memory virtulization. One would swap memory object out of device memory into host memory (and, ultimately, even into swap file). It's good for memory-demanding apps that algorithm can not tolerate lower memory amount.
But for other apps it will be surely performance killer if such swapping will be done on runtime discretion w/o any control from app author. In this case maybe some additional attribute will be needed just as page-locking for Windows VirtualAlloc. Some data should stay in GPU memory while other could be swapped out of it. It becomes especially important when few GPGPU apps executed simultaneously. Improper memory swapping can kill performance for all of them.
0 Likes