Cycles: Support multithreaded compilation of kernels
Needs ReviewPublic

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

Details

Summary

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

Repository
rB Blender
Branch
opencl_multithreading (branched from master)
Build Status
Buildable 207
Build 207: arc lint + arc unit
intern/cycles/device/opencl/opencl_util.cpp
450

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.
intern/cycles/util/util_system.cpp
311

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