Crash with OpenCL

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Crash with OpenCL

Post by jensverwiebe »

david57 wrote: Tue Jan 30, 2018 9:57 pm Ok, having trouble understanding about PATHCPU and PATHOCL. What do they mean?
My CPU is Intel i7-6700K CPU@ 4.00GHz and not AMD.
PATHCPU means native c++ driven rendering, no opencl involved.

PATHOCL lets you use all opencl capable devices you have, this can be gpu and cpu.
The benefit of latter is you can use cpu and gpu at the same time for boosting rendering.

If opencl turns out to be a beast, its often recommended to first test only with ocl cpu device, cause this
is almost the stablest testcase, whereas gpu devices failure can be also from bad drivers.
( That said also cpu has a vendor ocl driver, but we very rarly saw any problems from them )
Another hint of working cpu but failing gpu can be a too huge memory print from a rendered scene.

Jens
david57
Posts: 103
Joined: Mon Jan 22, 2018 11:30 pm

Re: Crash with OpenCL

Post by david57 »

Ok, did not know this about PATHCPU and PATHOCL.
Strange, if PATHCPU is c++ then what language is used for GPU's?
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Crash with OpenCL

Post by jensverwiebe »

david57 wrote: Tue Jan 30, 2018 10:45 pm Ok, did not know this about PATHCPU and PATHOCL.
Strange, if PATHCPU is c++ then what language is used for GPU's?
GPU is always opencl ( or cuda, which is not supported by luxcore )
Ocl can be written in C or C++ using the so called C++-bindings ( thats also luxcore design )

Jens
david57
Posts: 103
Joined: Mon Jan 22, 2018 11:30 pm

Re: Crash with OpenCL

Post by david57 »

Ok, I understand now, I think. Languages Opencl is for AMD GPU's and Cuda for INTEL GPU's.
So, LuxCore is written with C++ and communicates with OpenCl.
Im lost with Ocl.
Us normal people have heard of CPU and GPU but we are not into programming languages.
:)
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Crash with OpenCL

Post by jensverwiebe »

david57 wrote: Tue Jan 30, 2018 11:19 pm Ok, I understand now, I think. Languages Opencl is for AMD GPU's and Cuda for INTEL GPU's.
So, LuxCore is written with C++ and communicates with OpenCl.
Im lost with Ocl.
Us normal people have heard of CPU and GPU but we are not into programming languages.
:)
Still a bit muddle here:
Opencl as well as cuda are compute languages.
Opencl can work with nvidia/amd/intel(iris etc.) gpu's as well as with amd/intel cpu's
Cuda will only work with nvidia, so its limited by device choice.
The underlaying code for ocl can be c or c++.
Luxcore is kinda coded in 2 parts always, one for native cpu and the other for ocl ( which is different by api ) for the specialized tasks,
but all is based on a common foundation where possible ( to avoid overhead ).
Therefore in rare cases, native cpu ( PATHCPU ) may have more features or is less limited than ocl. ( depends on ocl version and drivers )
Read a bit here:https://www.khronos.org/opencl/

The interesting point is if to decide for an open crossvendor computelanguage like opencl or
a vendorbound one like cuda. Initially the decision is easy ;) but sometimes coders decide
cause of matureness or features they need ( for example tensor cores for ml/ki )

Cheers .. Jens
david57
Posts: 103
Joined: Mon Jan 22, 2018 11:30 pm

Re: Crash with OpenCL

Post by david57 »

Thanks, that was somewhat interesting.
Im guessing C++ is created with Assembly Language?
My first computer, a laptop with 1 MB or Ram was operated with GeoWorks Ensemble.
I then installed Windows 3.1, i think it was.
Then with that same computer started to learn Dos and Assembly Language.
Later with other computers, I got into C++ and later Visual C from Microsoft and then Visual Basic.
Years ago, I stopped working with programming and have forgotten most of what I learned.
:)
jensverwiebe
Supporting Users
Posts: 141
Joined: Tue Jan 09, 2018 6:48 pm

Re: Crash with OpenCL

Post by jensverwiebe »

Jep, the drivers have an isa-compiler that produces device-specific assembler.
This can also be done offline with openclc or llvm nowadays. The fun is sometimes sw-based
kernelcompiles are faster and more reliable.

Jens
Last edited by jensverwiebe on Thu Feb 01, 2018 11:43 am, edited 1 time in total.
david57
Posts: 103
Joined: Mon Jan 22, 2018 11:30 pm

Re: Crash with OpenCL

Post by david57 »

You guys are gifted.
I only learned some of the basics and forgotten what had learned.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Crash with OpenCL

Post by Dade »

david57 wrote: Tue Jan 30, 2018 10:02 pm Ok, here is the test blender file:
I'm testing the scene (it is the one that was posted in another thread, it is the scene with 960 light sources). It crashes inside Blender but it throws an error in LuxCoreUI:

Code: Select all

The SampleData buffer is too big for GeForce GTX 980 Intersect device (i.e. CL_DEVICE_MAX_MEM_ALLOC_SIZE=1073692672): try to reduce related parameters
The scene has a max. path depth of 128 and uses METROPOLIS sampler, no GPU has that kind of memory. Just reduce the max. path depth to something reasonable like 32 (64 works too) and switch to SOBOL sampler and it should work for you too:
glass.jpg
I think the Blender may crash because of the unexpected exception, it should be easy to fix.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Crash with OpenCL

Post by B.Y.O.B. »

Dade wrote: Thu Feb 01, 2018 9:20 pm I think the Blender may crash because of the unexpected exception, it should be easy to fix.
Logged: https://github.com/LuxCoreRender/BlendLuxCore/issues/63
Post Reply