Page MenuHome

Cycles: Compile Directive Parallel OpenCL Compilation
Needs RevisionPublic

Authored by Jeroen Bakker (jbakker) on Thu, Aug 8, 3:20 PM.

Details

Summary

OpenCL Parallel compilation is only supported in Blender. When compiling
the Cycles standalone it did not compile any kernels as the standalone
app does have a Python API.

When compiling with the standalone the parallel compilation will be
disabled. Otherwise we need to compile multiple versions of the
libraries for it to work.

Diff Detail

Repository
rB Blender
Branch
cycles-opencl-compile-directive (branched from master)
Build Status
Buildable 4349
Build 4349: arc lint + arc unit

Event Timeline

Jeroen Bakker (jbakker) planned changes to this revision.Thu, Aug 8, 3:33 PM

Seems to crash during viewport rendering will need more testing.

Jeroen Bakker (jbakker) retitled this revision from Cycles: Compile Directive Parallel OpenCL Compilation to [WIP] Cycles: Compile Directive Parallel OpenCL Compilation.Thu, Aug 8, 4:46 PM

loading of the compiled kernels when not using parallel compilation

Jeroen Bakker (jbakker) retitled this revision from [WIP] Cycles: Compile Directive Parallel OpenCL Compilation to Cycles: Compile Directive Parallel OpenCL Compilation.Fri, Aug 9, 9:54 AM
Brecht Van Lommel (brecht) requested changes to this revision.Mon, Aug 12, 11:16 AM

This does not need a build option or #ifdefs in some many places in the code as far as I can tell.

Can't we do just something like this, adding a running_inside_blender global?

bool OpenCLDevice::OpenCLProgram::compile_separate(const string &clbin)
{
  if (!DebugFlags().running_inside_blender) {
    return false;
  }

Having different code being compiled for Cycles standalone and Blender is something we should avoid as much as possible.

This revision now requires changes to proceed.Mon, Aug 12, 11:16 AM