Dev:Source/Render/Cycles/OpenCL

提供: wiki
移動先: 案内検索

OpenCL Status

Cycles has a split OpenCL kernel since Blender release 2.75. It's an alternative approach to what is used on CPU (so called megakernel). The idea behind splitting the kernel is to have multiple smaller kernels which are not only simpler and faster to compile, but also have better performance. Initial split kernel patch was done by AMD. Further work was also funded by AMD.

The OpenCL Split Kernel now supports nearly all features. Baking works, but uses the mega kernel. Volumetrics, SSS, Branched path tracing, HDR lightning and Denoising are fully supported.

With current drivers, all production files from the official cycles benchmark pack, including the huge one from Gooseberry, render now pretty fast.

Timings.png

Other differences with CUDA

With latest drivers, AMD cards using OpenCL can use system memory to render scenes that are bigger than the GPU memory. Baking is slower due to the mega kernel being used there until it can also use the split kernel. Also, the first rendering of a scene may have a compile time depending on the features used.

Testing

Activate OpenCL rendering

  • For AMD cards on Windows and Linux you just need to select your GPU under file -> user preferences -> system. The split kernel will be used by default to give the best performance.
  • To use OpenCL on other platforms, launch Blender with --debug-value 256 (either on the command line or by adding it to your shortcut). It will add a section "debug" in the render options panel. There you can choose the kernel (split or mega) and the platform (set to "all" to enable OpenCL for Intel and NVidia).

Then choose GPU as the device to render in the render option panel.

Benchmarking

To test the performance of your computer, you can download the official Cycles Benchmark files from here https://download.blender.org/demo/test/cycles_benchmark_20160228.zip. Those include production files for films, archviz (exterior and interior), comics, etc.

How to get the best performance

  • Tile size of 64x64 up to 256x256 give the best performance.

Compare your results

Current issues and limitations

There are some known issues which are common to all kernels and platforms:

  • Use latest buildbot to benefit from all speedups and new functionalities.

Supported AMD Cards

For now those limitations are considered a TODO rather than a bug.

AMD on OSX (outdated section, to be updated)

AMD team who's working on OSX drivers for El Capitan (OS X 10.11) did really nice work on improving the driver which is now capable of compiling and running OpenCL megakernel.

OpenCL on other platforms

OpenCL works fine on NVIDIA cards, but performance is reasonably slower (up to 2x slowdown) compared to CUDA, so it doesn't really worth using OpenCL on NVIDIA cards at this moment.

Intel OpenCL works reasonably well. It's even possible to use OpenCL to combine GPU and CPU to render at the same time, for until some more proper solution is implemented.