Closed GoogleCodeExporter closed 9 years ago
Do you know how much ram your graphics card has?
If you execute clinfo (shipped with AMD's OpenCL implementation for determining
OpenCL characteristics) it should report the max amount of available GPU
memory.
This will be the limit for allocation size.
For my APU this is around 200 MB total bytes
Max memory allocation: 199753728
Note that this does not mean my program gets all of this. My experience is
that OpenCL will only allow your program to allocate 25%-40% of this.
A 12000 * 12000 image of int's (for RGBA style pixel info) would require 576Mb
(assuming that this is the only memory you are accessing from your kernel).
How much memory does your GPU card have?
Gary
Original comment by frost.g...@gmail.com
on 29 Aug 2012 at 4:28
[deleted comment]
Thnx gray...
My card Max memory allocation: 268435456 ( near abt 256 MB)
and Global memory size: 1073741824 (near about 1024MB or 1GB).
i am using two int array of size 12000 * 12000 in my kernel, but image property
show its 14.1 MB JPEG image with 12000 * 12000 pixel .
is it any way break the array and do computation on GPU when calling kernel (
Kernel.execute()).
Same progam is running on CPU having large memory as compare to GPU card .
Max memory allocation:7369785344 (near about 6 GB)
Global memory size: 29479141376 (near about 27 GB)
...
Original comment by kri22go...@gmail.com
on 30 Aug 2012 at 6:57
So two int arrays of 12000 x 12000 would be 12000*12000*2*sizeof(int) =
144000000*2*4 = 288000000*4 = 1.152 Gb
Sadly you don't have enough memory to process this image in you graphics card
memory.
Maybe you can process it in 9 chunks (top left, top middle, top right, middle
left, middle etc)?
What kind of processing are you doing? Is it a convolution?
The 14.1 MB JPEG file is highly compresssed.
Gary
Original comment by frost.g...@gmail.com
on 30 Aug 2012 at 1:00
thnx gary..
i am doing sobel edge detection algorithm....
Original comment by kri22go...@gmail.com
on 31 Aug 2012 at 11:51
So you should be able to work on the image in chunks.
Let me know how it works.
I will close this issue.
Maybe I should add an example convolution for large images....
Gary
Original comment by frost.g...@gmail.com
on 31 Aug 2012 at 12:22
i read image using imageIo api and got an int array of RGBA. i transfer that
array to GPU card and use convolution for that but not in chunks...
using globalId i calculated X and Y and neighbour pixel and apply convolution
to each pixel and store out put in another array,,
Original comment by kri22go...@gmail.com
on 31 Aug 2012 at 1:05
Original comment by ryan.lam...@gmail.com
on 22 Apr 2013 at 5:08
Original issue reported on code.google.com by
kri22go...@gmail.com
on 28 Aug 2012 at 12:03