## ATI released OpenCL SDK with hardware support

Discussions related to GPU Acceleration in LuxRender

### Re: ATI released OpenCL SDK with hardware support

Nice progress. Of course, doing localized computations like that is what GPU devices are best at, so I doubt we'll see a 38x improvement on anything non-trivial
May contain traces of nuts.

Lord Crc

Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

### Re: ATI released OpenCL SDK with hardware support

After watching (and listening to) Dade's video I have pity on his keyboard. =))
Linux builds packager

SATtva

Posts: 7162
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: ATI released OpenCL SDK with hardware support

SATtva wrote:After watching (and listening to) Dade's video I have pity on his keyboard. =))

Haha, I noticed my my Nikon Coolpix records audio too only after I uploaded the video

Posts: 8302
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: ATI released OpenCL SDK with hardware support

It's good you didn't mumbled about us stupid users drowning you in bug reports and feature requests... or about your [censored] boss. :D
Linux builds packager

SATtva

Posts: 7162
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: ATI released OpenCL SDK with hardware support

Wow, that is crazy-fast

One course I did last year had a task which was basically the same end result, i.e. draw the mandelbrot set to the screen. It was a lot more basic and written in Java, so you can imagine what it was like comparatively!
Down Rodeo

Posts: 145
Joined: Sun Nov 11, 2007 3:24 pm
Location: Scotland

### Re: ATI released OpenCL SDK with hardware support

Very cool stuff!

Dade wrote:It uses the 4 cores but it has the same performance of mandelCPU (with only one core). I guess CPU devices are useful only for developing purpose (i.e. when you don't have a fast GPU available).

ATI implementation on CPU might be poor.
Perhaps they did not bother adding proper multi-thread support. They want to push their GPUs after all
gagar

Posts: 35
Joined: Mon Dec 08, 2008 4:50 pm

### Re: ATI released OpenCL SDK with hardware support

gagar wrote:ATI implementation on CPU might be poor.
Perhaps they did not bother adding proper multi-thread support. They want to push their GPUs after all

Yeah, anyway it is still a quite useful tool for developing application anywhere you want.

BTW, the sources of MandelGPU are available here: http://davibu.interfree.it/opencl/mande ... elGPU.html

Meeting the requirements to run the software is not trivial (i.e. ATI beta X11 driver and beta SDK) but I would be quite interesting to know if/how MandelGPU works on new ATI HD5xxx family and NVIDIA GPUs too.

Posts: 8302
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: ATI released OpenCL SDK with hardware support

Hi,

I'll sure try it as soon as I manage to run the CLinfo application without a segfault when it initializes

Jeanphi
jeanphi

Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

### Re: ATI released OpenCL SDK with hardware support

I've compiled your code on my Linux64 box with nvidia's 8400 GS using nvidia's CUDA/OpenCL sdks.

The sdk sample programs compile and run without error.

Nevertheless, when I try to run mandelGPU I get the following output:
Code: Select all
doug@l64dev:~/dev/mandelgpu/MandelGPU$./mandelGPU Usage: ./mandelGPU <use CPU device (0 or 1)> <use GPU device (0 or 1)> <max. iterations> OpenCL Device 0: Type = TYPE_GPU OpenCL Device 0: Name = GeForce 8400 GS OpenCL Device 0: Compute units = 1 Reading file 'rendering_kernel.c' (size 2086 bytes) Failed to enqueue OpenCL work: -30 EDIT: additionally, running mandelGPU in CPU mode doesn't work either: Code: Select all doug@l64dev:~/dev/mandelgpu/MandelGPU$ ./mandelGPU 1 0 1000
Usage: ./mandelGPU <use CPU device (0 or 1)> <use GPU device (0 or 1)> <max. iterations>
Failed to open OpenCL context

the compile process shows no errors or warnings whatsoever.

dougal2

Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

### Re: ATI released OpenCL SDK with hardware support

dougal2 wrote:Failed to enqueue OpenCL work: -30

-30 stands for CL_INVALID_VALUE. I would try to do this change to the sources, edit the following lines from:

Code: Select all

// Enqueue a kernel run call
cl_event events[2];
globalThreads[0] = width * height / 4;

status = clEnqueueNDRangeKernel(
commandQueue,
kernel,
1,
NULL,
NULL,
0,
NULL,
&events[0]);

to:

Code: Select all
// Enqueue a kernel run call
cl_event events[2];
globalThreads[0] = width * height / 4;

status = clEnqueueNDRangeKernel(
commandQueue,
kernel,
1,
NULL,
0,
NULL,
&events[0]);

Start with "localThreads[0] = 1" and try to rise the value, my 4870 supports up to 256. NULL is supposed to be a valid values, it should tell OpenCL to autoconfig ... I guess the standard isn't so standard. If it works I know a way to get the right value automatically from OpenCL.

Otherwise, if it doesn't work, I would try to render some small image size: edit the displayfunc.c file and change the initial values for "width" and "height" to something small (for instance 320x240).

dougal2 wrote:EDIT: additionally, running mandelGPU in CPU mode doesn't work either:

This is normal, the NVIDIA OpenCL doesn't support CPU devices at all