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 jensverwiebe » Mon Dec 07, 2009 8:38 am

Some results with my setup:

Mandel:
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8800 GT
OpenCL Device 0: Compute units = 14
OpenCL Device 1: Type = TYPE_CPU
OpenCL Device 1: Name = Intel(R) Xeon(R) CPU 5150 @ 2.66GHz
OpenCL Device 1: Compute units = 4


CPU:
Rendering time: 0.252383 secs (Sample/sec 3116026 Max. Iterations 256)
CL-CPU:(useCPU = 1, useGPU = 0)
Rendering time: 0.077733 secs (Sample/sec 10117093 Max. Iterations 256)
CL-GPU:(useCPU = 0, useGPU = 1)
Rendering time: 0.007347 secs (Sample/sec 107041240 Max. Iterations 256)
CL-CPU/GPU:(useCPU = 1, useGPU = 1)
Rendering time: 0.006119 secs (Sample/sec 128522968 Max. Iterations 256)


Small: ( still weird issue )
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8800 GT
OpenCL Device 0: Compute units = 14
OpenCL Device 0: Max. work group size = 512
Reading file 'rendering_kernel.cl' (size 2634 bytes)
Failed to build OpenCL kernel: -11
OpenCL Programm Build Log: <program source>:26:10: fatal error: 'camera.h' file not found
#include "camera.h"


Have to play around a bit more...



Jens
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

Re: ATI released OpenCL SDK with hardware support

Postby Dade » Mon Dec 07, 2009 10:39 am

jensverwiebe wrote:Small: ( still weird issue )
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8800 GT
OpenCL Device 0: Compute units = 14
OpenCL Device 0: Max. work group size = 512
Reading file 'rendering_kernel.cl' (size 2634 bytes)
Failed to build OpenCL kernel: -11
OpenCL Programm Build Log: <program source>:26:10: fatal error: 'camera.h' file not found
#include "camera.h"


I run the kernel compiler with a "-I." option. Are you running smallptGPU in the directory where all the sources are ? Otherwise it will be unable to find the headers. Keep in mind OpenCL compile the kernel at runtime (when you run smallptGPU).

As work around, in case the "-I." option doesn't work on your platform, you can try:

cpp <rendering_kernel.cl >tmp.cl
mv tmp.cl rendering_kernel.cl
User avatar
Dade
Developer
 
Posts: 8356
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: ATI released OpenCL SDK with hardware support

Postby ornitorrincos » Mon Dec 07, 2009 11:01 am

running smallptGPU gives me the following error:
Code: Select all
[ilcra1989@acheron SmallptGPU-v1.0]$ smallptGPU 0 1 800 600 scenes/cornell.scn
Usage: smallptGPU
Usage: smallptGPU <use CPU device (0 or 1)> <use GPU device (0 or 1)> <window width> <window height> <scene file>
Reading scene: scenes/cornell.scn
Scene size: 9
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8500 GT
OpenCL Device 0: Compute units = 2
OpenCL Device 0: Max. work group size = 512
Reading file 'rendering_kernel.cl' (size 2634 bytes)
Failed to build OpenCL kernel: -42
OpenCL Programm Build Log: ptxas ptx input, line 2088; fatal   : Parsing error near '.': syntax error
: Retrieving binary for 'anonymous_jit_identity', for gpu='sm_11', usage mode='
ornitorrincos
 
Posts: 8
Joined: Tue Jul 28, 2009 10:01 am

Re: ATI released OpenCL SDK with hardware support

Postby jensverwiebe » Mon Dec 07, 2009 11:12 am

I guess i have forgoten to compile some lib, perhaps libgcc?

Cause generally it looks like the -I. option works, the files ( in spite of being there ) are just not loaded.

dunno atm

Here´s my make-setting:
CC=gcc
CCFLAGS=-O3 -msse2 -msse3 -mssse3 -mfpmath=sse -ftree-vectorize -funroll-loops -Wall \
-framework OpenCL -framework OpenGl -framework Glut



Jens
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

Re: ATI released OpenCL SDK with hardware support

Postby Lord Crc » Mon Dec 07, 2009 1:59 pm

Dade wrote:I get only 400,000 samples out of OpenCL CPU device so I guess it is just the Linux version to sucks (we have exactly the same CPU). I get about 1million less sample/sec than you on GPU but your board is newer than mine (even if mine is a 48x instead of a 47xx). It could be again the Linux drivers to be slower too (nothing new :?).


Sounds like primarily driver issues yes. Although I do have an factory overclocked 4890 @ 960 Mhz, I can't see how it is THAT much faster. I might add that windows lags BAD when it's running (aero uses 3d as well) so I'm sure it's working hard :D

Btw, may I ask why you do the funky stuff in the random generator? Why not just mask off the lower 24 bits and divide by 2^24 ?
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 dougal2 » Mon Dec 07, 2009 2:09 pm

I swapped out the GPU in my dev machine for the 8800GT I had at work:

Some nice results with MandelGPU
Code: Select all
doug@l64dev:~/dev/mandelgpu/MandelGPU$ ./mandelGPU 0 1 10000
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 8800 GT
OpenCL Device 0: Compute units = 14
Reading file 'rendering_kernel.c' (size 2086 bytes)
Rendering time: 0.400000 secs (Sample/sec 1966080 Max. Iterations 10000)
Rendering time: 0.400000 secs (Sample/sec 1966080 Max. Iterations 10000)


This card is more than 10x faster than the 8400GS I previously tested :twisted:

I'll have another look at the smallptGPU situation after dinner
User avatar
dougal2
Developer
 
Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: ATI released OpenCL SDK with hardware support

Postby dougal2 » Mon Dec 07, 2009 3:10 pm

By inserting a 'return;' in the kernel code at various places, I've determined that my -42 error is being caused at the following line:

Code: Select all
 Radiance(Spheres, SphereCount, &ray, &seeds[gid2], &r);


I'll see if I can dig through the Radiance() function in a similar way to see which part of it causes the error.

EDIT:
With a return; as the first statement inside Radiance() I now get
Code: Select all
doug@l64dev:~/dev/SmallptGPU-v1.0$ ./smallptGPU 0 1 1024 768 scenes/simple.scn
Usage: ./smallptGPU
Usage: ./smallptGPU <use CPU device (0 or 1)> <use GPU device (0 or 1)> <window width> <window height> <scene file>
Reading scene: scenes/simple.scn
Scene size: 5
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8800 GT
OpenCL Device 0: Compute units = 14
OpenCL Device 0: Max. work group size = 512
Reading file 'rendering_kernel.cl' (size 2893 bytes)
Failed to enqueue OpenCL work: -5


and -5 appears to be CL_OUT_OF_RESOURCES.

I'm not sure what else I can do now.
User avatar
dougal2
Developer
 
Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: ATI released OpenCL SDK with hardware support

Postby dougal2 » Mon Dec 07, 2009 3:22 pm

CL_OUT_OF_RESOURCES is being caused by the final line in the kernel, not the call to Radiance()
Code: Select all
// Radiance(Spheres, SphereCount, &ray, &seeds[gid2], &r);

/* SNIP */

 pixels[y * width + x] = toInt(colors[i].x) | (toInt(colors[i].y) << 8) | (toInt(colors[i].z) << 16);
User avatar
dougal2
Developer
 
Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: ATI released OpenCL SDK with hardware support

Postby dougal2 » Mon Dec 07, 2009 3:40 pm

Apologies for the rolling commentary, but it's much easier to write this as I go along.

Back to debugging Radiance()....

I have inserted a 'return;' in to Radiance() here:
Code: Select all
                if (!Intersect(spheres, sphereCount, &currentRay, &t, &id)) {
                        *result = rad; /* if miss, return */
                        return;
                }

                return;


in order to find a crash in Intersect();

I traced that all the way through to the line
Code: Select all
                        *t = d;


If I comment out that line the renderer runs, but with it in I get CL_OUT_OF_RESOURCES

I'm going to stop now... not really sure what I'm looking for here.
User avatar
dougal2
Developer
 
Posts: 3131
Joined: Mon Jan 14, 2008 7:21 am

Re: ATI released OpenCL SDK with hardware support

Postby jensverwiebe » Mon Dec 07, 2009 4:57 pm

Hi
Preprocessed now as suggested and got further 1 step only:
OpenCL Device 0: Type = TYPE_GPU
OpenCL Device 0: Name = GeForce 8800 GT
OpenCL Device 0: Compute units = 14
OpenCL Device 0: Max. work group size = 512
Reading file 'rendering_kernel.cl' (size 14900 bytes)
Failed to enqueue OpenCL work: -54


Hmmmm

EDIT: it works on CPU ( the smallGPU ) with ./smallptGPU 1 0 1024 768 scenes/simple.scn

hmmmm

Jens
Last edited by jensverwiebe on Mon Dec 07, 2009 5:07 pm, edited 1 time in total.
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

PreviousNext

Return to GPU Acceleration

Who is online

Users browsing this forum: Bing [Bot] and 3 guests