GPU - LuxRender Wiki
Luxrender GPL Physically Based Renderer

GPU

Personal tools

From LuxRender Wiki

Jump to: navigation, search

One of the most exciting features in LuxRender for many users is GPU acceleration. LuxRender uses the open GPGPU computing standard OpenCL to allow a variety of "compute devices" (such as graphics cards) in your system to accelerate the render process. The purpose of this page is to help inform users as to the features and status of GPU support in LuxRender.

GPU support is still a work in progress. The beginnings of the GPU support are available in the current stable release, v0.8. Since the development has progressed significantly since then, it is recommended that you use the 0.9 development builds if you are interested in GPU support. This page will describe features from both versions.

Contents

Introduction to OpenCL

OpenCL is an open specification for computing on "heterogeneous" devices. This means you can target the various processing devices in the system simply as an "OpenCL device" and use them for your computation task, regardless as to what kind of device they actually are. In most real-world situations, that device is a graphics card. However, you can also target the main CPU of a computer. This allows a fallback for OpenCL-enabled applications on systems that do not support OpenCL, as well as allowing a process to pull all resouces of the system at once if need be. An OpenCL device can theoretically be any general-purpose computing device in the machine, not just the CPU or GPU. it could be another GPU not attatched to any displays, or it could be a special acceleration card, such as Cell processor card.

Hybrid Rendering

Currently, LuxRender's GPU rendering uses a CPU/GPU hybrid renderer.

The problem with using OpenCL is that some functions are difficult to implement within its code. One possible solution is to use a powerful OpenCL device (usually the machine's graphics card) to handle the brute-force work being fed to it by the regular CPU. This is how LuxRender's hybrid renderer works. The CPU handles most of the tasks of the render, such as running the interface, sampling rays, managing the image buffer and effects, etc. The GPU handles the heavy-lifting part of rendering, figuring out which pieces of geometry the ray hit. This allows nearly all the features of a CPU renderer, while running at 2-3 times the speed.

However, there is a flip-side. While a CPU/GPU hybrid can achieve 2-3x the speed of a pure CPU render, a renderer written entirely using OpenCL can achieve far greater speed increases, on the order 5-10x or more. A pure-OpenCL renderer has been experimented with in SmallLuxGPU, and there are plans to port it to LuxRender. There is no timetable for this at the moment, and it will likely support only a subset of LuxRender's features.

Getting Started with GPU in LuxRender

If you would like to get started with LuxRender's hybrid GPU/CPU renderer, it is best to download an 0.9 development build, or compile one yourself. If you would like a development build, you can visit our weekly test build forum or the LuxRender section at Graphicall.org. Simply select the most recent build for your platform. In the stable (v0.8) release, the hybrid renderer did not support bidirectional path tracing (often referred to as the "hybrid bidir" mode for short). While the simple path tracing mode (usually nicknamed "hybrid path") was present, the version in the 0.9 builds includes far less memory use, support for rendering on multiple graphics cards simultaneously, more light sampling options, and better GPU-configuration options.

System Requirements

Nvidia

Hybrid requires a GeForce 8-series or newer card, or equivalent Quadro card. Tesla support has not been tested, but is believed to work, at least with LuxRender 0.9.

Note that older or lower-end cards such as the GeForce 8600 or GeForce 9400 may lack the raytracing performance needed for the hybrid renderer to be faster than a pure CPU renderer. This is primarily a limitation of the technology at the time/price-range, and is not likely to improve in the future.

On Linux and Windows, you will need driver version 195.39 or newer. Using the latest available drivers is recommended for best performance and stability. On Mac OS X, you will need OS X 10.6 or later. 10.7 is recommended, as it gives substantially better performance.


AMD/ATI

You will need an HD 5000 series or newer card, or equivalent FirePro model. The HD 4000 series cards are not supported. This is not due to a lack of support from LuxRender, but rather a lack of proper driver support by AMD.

On Linux and Windows, you will also need to install the OpenCL version of the driver. This may not be included in the standard release, or may be an optional install. You can get the proper drivers from http://support.amd.com/us/gpudownload/Pages/index.aspx

You will need driver version 10.10 or later. The latest version is recommended for best performance and stability. On Mac OS X, you must be using OS X 10.6 or newer. 10.7 is recommend, as it gives substantially better performance.

Using GPU Rendering

In LuxRender 1.0, you have to open LuxRender Render Settings, and select Rendering Mode Hybrid Path or Hybrid Bidirectional. When using "bidirectional" you must set your light strategy in the Advanced section to "one". Here is the example for Hybrid Path:

Luxrender1.0 light strategy.jpg

In LuxRender 0.9, you can use hybrid rendering by selecting "hybrid" as your "renderer" type, and setting surface integrator to "path" or "bidirectional". When using "bidirectional" you must set your light strategy to "one".

In LuxRender 0.8, you can only use the "path" surface integrator, and you must use the light strategy "one. (in LuxRender 0.9, "path" can be used with the "all" or "auto" light strategies as well).

Troubleshooting

LuxRender has started, but I get a black screen, and there are no log warnings

Several users have reported issues with setting the OpenCL work group size to 0, which is supposed to be the auto-detect mode. Setting it manually to 64 seems to work around the issue. Also, this can happen when using an ATI HD 4000 series card. While these cards technically support OpenCL, AMD has neglected to support several features on HD 4000 series cards in their recent drivers, and these features are required for running LuxRender. See the AMD/ATI section above

I have multiple graphics cards, but LuxRender will only use one

This was a known limitation in the stable (0.8) release. This should not be an issue with the development builds unless you specifically set LuxRender to use only one card with the OpenCL devices flag. Note the LuxRender 0.9 does require all targeted devices to be in the same OpenCL platform, but unless you have cards from multiple brands installed (meaning your computer has an Nvida AND an AMD card in it) this should be the case anyway.

LuxRender's log does not show my GPU as being found, even though I have a supported card

By default, LuxRender will target OpenCL platform "0". While this is probably the platform that contains your graphics card, it may not be. You can try increasing the OpenCL Platform setting in the exporter/scene file by 1 until the graphics card is used.

Hybrid is slower than the CPU renderer! Why!?

Being a hybrid CPU/GPU renderer, LuxRender has to deal with some overhead going back and forth between the CPU and GPU. On a simple scene, or with a slow GPU, this overhead may be larger than the speedup from the GPU, resulting in a slower overal render speed.

The GPU Load stat in LuxRender does not match the load reported by my graphics driver

The load shown in the LuxRender GUI is not the computation load on the card as a whole. Rather, it shows the percentage of time that LuxRender is able to keep the GPU fed with rays to trace. In other words, it shows how LuxRender is balancing use between the CPU and the GPU. Since this is specific subset of the GPU's total load, and is only from one application, it will not match what your driver reports.