NVIDIA OpenCL Drivers & News

Discussions related to GPU Acceleration in LuxRender

Moderators: Dade, jromang, tomb, coordinators

Re: NVIDIA OpenCL Drivers & News

Postby burnin » Tue Jan 05, 2016 6:16 pm

Tested:
Clouds (diffuse) + Voronoi (bump)

Compilation times:
- 3108ms = Path
- 255936ms = Biased Path

win7x64, Nvidia Q M5000 (drivers 354.56)
Now CPU (Q9300 OCL 1.1) from 2008 renders faster :P
burnin
 
Posts: 287
Joined: Mon May 03, 2010 8:04 pm

Re: NVIDIA OpenCL Drivers & News

Postby SATtva » Wed Jan 06, 2016 2:19 am

Biased Path is a special case at the moment -- it hasn't been split up into the microkernel architecture yet, so the compiler can easily choke on it.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7164
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: NVIDIA OpenCL Drivers & News

Postby burnin » Wed Jan 06, 2016 4:46 am

ah, thanks for clarification... and a cheerful holidays
burnin
 
Posts: 287
Joined: Mon May 03, 2010 8:04 pm

Re: NVIDIA OpenCL Drivers & News

Postby jensverwiebe » Wed Jan 06, 2016 10:24 am

I found a workaround for slow kernel compile. Add in configline opencl.kernel.options = -cl-opt-disable
and suddenly the kernels are build in a rush.
For example the ultraslow voronoi: ( download/file.php?id=23683 )
Code: Select all
[LuxCore][12.370] [PathOCLBaseRenderThread::0] Compiling kernels
[LuxCore][15.299] [PathOCLBaseRenderThread::0] Kernels not cached
[LuxCore][15.299] [PathOCLBaseRenderThread::0] Compiling Film_Clear Kernel
[snip][/snip]
[LuxCore][15.300] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_GENERATE_CAMERA_RAY Kernel
[LuxCore][15.300] [PathOCLBaseRenderThread::0] Kernels compilation time: 2931ms


It should make render a lot slower, have yet to measure this. Perhaps it can be used only in the build options for
the desired clBuildProgram for blender textures ? At least this proves the long compiletimes come from optimization
problems with NVidia IL compiler.

Some other hints are here: http://stackoverflow.com/questions/2201 ... sted-loops
In short, we can control loopunrolling and perhaps nested switches with #pragmas.

Todo: find out if this finding can be used selective and smart for problematic areas.
More to come later.
EDIT: another thing to check is -cl-nv-opt-level<0 - 3> ( default is 3 ) not working

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

Re: NVIDIA OpenCL Drivers & News

Postby acasta69 » Wed Jan 06, 2016 11:50 am

jensverwiebe wrote:I found a workaround for slow kernel compile. Add in configline opencl.kernel.options = -cl-opt-disable
and suddenly the kernels are build in a rush.

Thanks for investigating this thing!
Rendering speed is indeed suffering (about 1/3 of the value with optimizations), but at least a result can be seen almost immediately! :)
Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v382.05
acasta69
 
Posts: 299
Joined: Fri Dec 20, 2013 3:18 am

Re: NVIDIA OpenCL Drivers & News

Postby burnin » Wed Jan 06, 2016 12:00 pm

OK, some more tests. :D
Had few crashes & few kills for not being patient without config.line :twisted:
Then it started to work 'fine' :D
Noticed that after any change to shading and moving back to BSD, compilation time increases for first 2 times then it gets stable. After changing back to Path is also super fast & compilation times are then stable at 150ms ±15%.

Here are consecutive compilation times:

BSD Path OCL:
1 - 31265ms
2 - 8155ms
3 - 157ms
4 - 172ms
5 - 156ms

Change engine to Path OCL:
1 - 157ms

Included Gold Fresnel Texture, Path OCL:
1 - 156ms

Change engine to BSD Path OCL:
1 - 31516ms
2 - 8202ms
3 - 141ms
4 - 157ms
burnin
 
Posts: 287
Joined: Mon May 03, 2010 8:04 pm

Re: NVIDIA OpenCL Drivers & News

Postby jensverwiebe » Wed Jan 06, 2016 12:03 pm

acasta69 wrote:
jensverwiebe wrote:I found a workaround for slow kernel compile. Add in configline opencl.kernel.options = -cl-opt-disable
and suddenly the kernels are build in a rush.

Thanks for investigating this thing!
Rendering speed is indeed suffering (about 1/3 of the value with optimizations), but at least a result can be seen almost immediately! :)


Yes, the renderspeed suffers too much from generally disabling opts, but i wanted ppl to proove that the driver is okay in general, just the compiler sucks.
Now i look for a good compromise. At, testing #pragma OPENCL EXTENSION cl_nv_pragma_unroll : enable and putting
#pragma unroll <value> in the desired places, where smaller values = shorter compile time and less kernel memory, larger values = longer compile time, more memory, but often much faster

@burnin: i fear you muddle precompiled stages ( + nvidia has an extra cache see /home/<user>/.nv/ComputeCache )

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

Re: NVIDIA OpenCL Drivers & News

Postby burnin » Wed Jan 06, 2016 1:20 pm

Oh :oops: those results are straight from Blender's System Console.
Can't find path you mention (/home/<user>/.nv/ComputeCache).
Am on Win7.
Sorry, can't be of any much help... just a viz artist.
Edit:
Also noticed rendering gets faster on 3rd iteration + also when using large tile size (256) for BSD path.
burnin
 
Posts: 287
Joined: Mon May 03, 2010 8:04 pm

Re: NVIDIA OpenCL Drivers & News

Postby jensverwiebe » Wed Jan 06, 2016 2:01 pm

Dunno where this cache resides on windows, but look into nvidia-smi, you can delete the cache from there afaik.

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

Re: NVIDIA OpenCL Drivers & News

Postby burnin » Thu Jan 07, 2016 9:02 am

Thanks. Found it (c:\Users\'username'\AppData\Roaming\NVIDIA\ + \ComputeCache & \GLCache), deleted contents... yeah, so slooow :cry:
Well, at least some things work. :lol:
burnin
 
Posts: 287
Joined: Mon May 03, 2010 8:04 pm

PreviousNext

Return to GPU Acceleration

Who is online

Users browsing this forum: Google [Bot] and 1 guest