LuxCore: PATHOCL Micro-kernels edition

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

LuxCore: PATHOCL Micro-kernels edition

Postby Dade » Fri Oct 31, 2014 10:38 am

Introduction

For a general introduction to the concept of "Mega Vs Micro" kernels, check: https://mediatech.aalto.fi/~timo/public ... _paper.pdf. SLG OpenCL kernels have followed the micro-kernel approach from the very beginning however, with the merge with LuxRender and the introduction of LuxRender materials, textures, light sources, etc. one of the kernel increased its size up to the point of being a "Mega-kernel".
The major problem with "Mega-kernel", aside of the inability of AMD OpenCL compiler to compile them, is the huge register usage and the very low GPU utilization.

PATHOCL Micro-kernels edition

A new version of PATHOCL is available in this branch: https://bitbucket.org/luxrender/luxrays ... crokernels

The sources of micro-kernels are available here: https://bitbucket.org/luxrender/luxrays ... crokernels

The number of kernels increases from 2 to 10, the register usage decrease from 196 (!!!) to 3-84 and the GPU utilization rise from a miserable 10% to a more healthy 30%-100%.

mega-vs-micro.jpg


The performance increase is huge on some platform (Linux + FirePro W8100):

perf.jpg


A well measurable (but smaller) speedup has been reported on MacOS and also with Windows + NVIDIA GPUs.

Solve the problems with AMD compiler

Micro-kernels not only improve the performance but also addressees the major issues with AMD OpenCL compiler. For the very first time since the release of first AMD OpenCL SDK beta, I'm not aware of a scene not running on AMD GPUs. This is SATtva's Mic scene running on GPUs for the first time:

mic.jpg


Conclusion

This feature will be extended to BIASPATHOCL and available in LuxRender v1.5.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: PATHOCL Micro-kernels edition

Postby sharlybg » Fri Oct 31, 2014 11:11 am

seriously christmas is not far :D

available for lux 1.5.

I'm ready to compare speed vs cycles octane and others as soon as possible !
i7 6700k + 32 Gb DDR4 + 2X R9 390 sapphir nitro.
User avatar
sharlybg
 
Posts: 730
Joined: Tue Nov 02, 2010 10:22 am
Location: Ivory coast

Re: LuxCore: PATHOCL Micro-kernels edition

Postby SATtva » Fri Oct 31, 2014 12:39 pm

Dade wrote:This is SATtva's Mic scene running on GPUs for the first time

A slightly simplified one. :) I wonder whether it will run now with less modifications (e.g. with mix material decals included).

Amazing work Dade, as usual!
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7164
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: LuxCore: PATHOCL Micro-kernels edition

Postby B.Y.O.B. » Fri Oct 31, 2014 1:33 pm

Truly impressive, can't wait to get my hands on it :)
User avatar
B.Y.O.B.
Developer
 
Posts: 5180
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: LuxCore: PATHOCL Micro-kernels edition

Postby DrPingy » Fri Oct 31, 2014 2:09 pm

I made a simple test with NVIDIA GTX760.

I use the latest source and switch with "path.microkernels.enable=1/0" and use the LuxCoreDemo V1.4.
Here the result:
with microkernel:
Mikrokernel.jpg
path.microkernels.enable=1


without microkernel:
Macrokernel.jpg
path.microkernels.enable=0


For this scene and HDR-PATHOCL is microkernel slower.

For Intel HD4600 I've got a bad Image with both kernels.
DrPingy
 
Posts: 141
Joined: Mon Dec 27, 2010 4:48 am

Re: LuxCore: PATHOCL Micro-kernels edition

Postby pciccone » Fri Oct 31, 2014 2:13 pm

Can wait to play with it. Thank you for your continued commitment to OpenCL mastery. You are setting the bar for everybody else.
User avatar
pciccone
Developer
 
Posts: 1579
Joined: Wed Jan 13, 2010 11:02 am
Location: South Carolina

Re: LuxCore: PATHOCL Micro-kernels edition

Postby cusa12345 » Fri Oct 31, 2014 2:22 pm

Congratulations Dade incredible when we could enjoy this improvement can put something together for blender demo guy ?.
cusa12345
 
Posts: 4
Joined: Thu Jan 31, 2013 1:50 pm

Re: LuxCore: PATHOCL Micro-kernels edition

Postby Dade » Fri Oct 31, 2014 2:27 pm

DrPingy wrote:I made a simple test with NVIDIA GTX760.

I use the latest source and switch with "path.microkernels.enable=1/0" and use the LuxCoreDemo V1.4.
Here the result:


More complex the scene is and better it works: you have used a scene with 2 materials (matte and mirror). The workgroup size also looks very very strange: 1024. Are you using some custom settings ?
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: PATHOCL Micro-kernels edition

Postby Dade » Fri Oct 31, 2014 2:29 pm

SATtva wrote:
Dade wrote:This is SATtva's Mic scene running on GPUs for the first time

A slightly simplified one. :) I wonder whether it will run now with less modifications (e.g. with mix material decals included).


If you want I can try it and check if it works :?:
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxCore: PATHOCL Micro-kernels edition

Postby DrPingy » Fri Oct 31, 2014 3:13 pm

More complex the scene is and better it works: you have used a scene with 2 materials (matte and mirror). The workgroup size also looks very very strange: 1024. Are you using some custom settings ?


Good hint. I made a new test with "PROCTEXBALL_MIX", like you have used.
With microkernel = 0.81 Msample/sec
without 0,78 Msample/sec.

I used default values for workgroup size. Now I set it to 64.
DrPingy
 
Posts: 141
Joined: Mon Dec 27, 2010 4:48 am

Next

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron