Cycles: Support multithreaded compilation of kernels
Needs ReviewPublic

Authored by Lukas Stockner (lukasstockner97) on Sep 28 2016, 11:55 PM.



This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Diff Detail

rB Blender
opencl_multithreading (branched from master)
Build Status
Buildable 207
Build 207: arc lint + arc unit

A bit annoying to have another compiler step which might possible fail..

Why it might fail?

Just to say it's a huge time saver for programmers. It allows to test optimisations and new features much faster. So it would be really helpful to add it at least as an experimental feature to master.

Together with D2254, it allows to build the simplest kernels in 2sec and the most advanced one in 11seconds compared to 20 to 38sec on master.

LazyDodo (LazyDodo) added inline comments.

Could we just do the math and alloc the memory we need? just allocating 10k on the stack and hoping it's enough feels sloppy and a buffer overflow exploit waiting to happen.

Patch needs update to work with current master