ATI released OpenCL SDK with hardware support

Discussions related to GPU Acceleration in LuxRender

Moderators: Dade, jromang, tomb, coordinators

Re: ATI released OpenCL SDK with hardware support

Postby Lord Crc » Sun Nov 29, 2009 7:52 am

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.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: ATI released OpenCL SDK with hardware support

Postby SATtva » Sun Nov 29, 2009 8:20 am

After watching (and listening to) Dade's video I have pity on his keyboard. =))
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7162
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: ATI released OpenCL SDK with hardware support

Postby Dade » Sun Nov 29, 2009 9:20 am

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 :D
User avatar
Dade
Developer
 
Posts: 8311
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: ATI released OpenCL SDK with hardware support

Postby SATtva » Sun Nov 29, 2009 9:43 am

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
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7162
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: ATI released OpenCL SDK with hardware support

Postby Down Rodeo » Sun Nov 29, 2009 1:06 pm

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

Postby gagar » Mon Nov 30, 2009 6:13 am

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

Postby Dade » Mon Nov 30, 2009 7:19 am

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.
User avatar
Dade
Developer
 
Posts: 8311
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: ATI released OpenCL SDK with hardware support

Postby jeanphi » Mon Nov 30, 2009 7:34 am

Hi,

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

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

Re: ATI released OpenCL SDK with hardware support

Postby dougal2 » Mon Nov 30, 2009 3:01 pm

@Dade

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.
User avatar
dougal2
Developer
 
Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: ATI released OpenCL SDK with hardware support

Postby Dade » Mon Nov 30, 2009 5:10 pm

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];
   size_t globalThreads[1];
   globalThreads[0] = width * height / 4;

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


to:

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

   status = clEnqueueNDRangeKernel(
         commandQueue,
         kernel,
         1,
         NULL,
         globalThreads,
         localThreads,
         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 :mrgreen:
User avatar
Dade
Developer
 
Posts: 8311
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

PreviousNext

Return to GPU Acceleration

Who is online

Users browsing this forum: No registered users and 1 guest