Rendu GPU

GPU rendering makes it possible to use your graphics card for rendering, instead of the CPU. This can speed up rendering because modern GPUs are designed to do quite a lot of number crunching. On the other hand, they also have some limitations in rendering complex scenes, due to more limited memory, and issues with interactivity when using the same graphics card for display and rendering.

To enable GPU rendering, go into the Preferences ‣ System ‣ Cycles Render Devices, and select either CUDA or OpenCL. Next, you must configure each scene to use GPU rendering in Properties ‣ Render ‣ Device.

Supported Hardware

Blender supports two different technologies to render on the GPU depending on the particular GPU manufacture.

NVIDIA CUDA

NVIDIA CUDA is supported for GPU rendering with NVIDIA graphics cards. Blender supports graphics cards with compute capability 3.0 and higher. To make sure your GPU is supported, see the list of NVIDIA graphics cards with the compute capabilities and supported graphics cards.

NVIDIA CUDA GPU rendering is supported on Windows, macOS, and Linux.

AMD OpenCL

OpenCL is supported for GPU rendering with AMD graphics cards. Blender Supports graphics cards with GCN generation 2 and above. To make sure your GPU is supported, see the list of GCN generations with the GCN generation and supported graphics cards.

AMD OpenCL GPU rendering is supported on Windows and Linux, but not on macOS.

Fonctionnalités prises en charge et limitations

GPU rendering supports all the same features as CPU rendering, except two:

  • Open Shading Language.
  • Advanced volume light sampling to reduce noise.

Foire aux questions (FAQ)

Pourquoi Blender n’est-il pas réactif pendant le rendu ?

Pendant qu’une carte graphique fait un rendu, elle ne peut pas redessiner l’interface utilisateur, ce qui rend Blender non réactif. Nous essayons

Si possible, il vaut mieux installer plus d’un GPU, en utilisant un pour l’affichage et l’autre (les autres) pour le rendu.

Pourquoi une scène qui rend sur un CPU ne rend pas sur le GPU ?

Il peut y avoir de multiples causes, mais la plus commune est qu’il n’y a pas assez de mémoire sur votre carte graphique. Actuellement nous ne pouvons rendre que des scènes qui rentrent dans la mémoire de la carte graphique, et elle est habituellement plus petite que celle du CPU. Notez, par exemple, que des textures images de 8k, 4k, 2k et 1k prennent respectivement 256 Mo, 64 Mo, 16 Mo et 4 Mo de mémoire.

Nous avons vraiment l’intention d’ajouter un système pour la prise en charge de scènes plus grandes que la mémoire GPU, mais cela ne sera pas pour tout bientôt.

Plusieurs GPU peuvent-ils être utilisés pour le rendu ?

Yes, go to Preferences ‣ System ‣ Compute Device Panel, and configure it as you desire.

Plusieurs GPU augmenteraient-ils la mémoire disponible ?

Non, chaque GPU ne peut accéder qu’à sa propre mémoire.

What renders faster, NVIDIA or AMD, CUDA or OpenCL?

Currently NVIDIA with CUDA is rendering fastest, but this really depends on the hardware you buy. Currently, CUDA and OpenCL are about the same in the newest mid-range GPUs. However, CUDA is fastest in the respect of high-end GPUs.

Messages d’erreur

In case of problems, be sure to install the official graphics drivers from the NVIDIA or AMD website, or through the package manager on Linux.

Version GNU non supportée ! gcc 4.7 et versions supérieures ne sont pas supportées !

On Linux, depending on your GCC version you might get this error. There are two possible solutions:

Use an alternate compiler

If you have an older GCC installed that is compatible with the installed CUDA toolkit version, then you can use it instead of the default compiler. This is done by setting the CYCLES_CUDA_EXTRA_CFLAGS environment variable when starting Blender.

Launch Blender from the command line as follows:

CYCLES_CUDA_EXTRA_CFLAGS="-ccbin gcc-x.x" blender

(Substitute the name or path of the compatible GCC compiler).

Remove compatibility checks

If the above is unsuccessful, delete the following line in /usr/local/cuda/include/host_config.h

#error -- unsupported GNU version! gcc 4.7 and up are not supported!

This will allow Cycles to successfully compile the CUDA rendering kernel the first time it attempts to use your GPU for rendering. Once the kernel is built successfully, you can launch Blender as you normally would and the CUDA kernel will still be used for rendering.

CUDA Error: Invalid kernel image

If you get this error on Windows 64-bit, be sure to use the 64-bit build of Blender, not the 32-bit version.

CUDA Error: Kernel compilation failed

This error may happen if you have a new NVIDIA graphics card that is not yet supported by the Blender version and CUDA toolkit you have installed. In this case Blender may try to dynamically build a kernel for your graphics card and fail.

Dans ce cas vous pouvez :

  1. Vérifier si la toute dernière version de Blender (officielle ou expérimentale) prend en charge votre carte graphique.
  2. Si vous construisez vous-même Blender, essayez de télécharger et installer une version plus récente de CUDA developer toolkit.

Normalement les utilisateurs n’ont pas besoin d’installer le CUDA toolkit car Blender est fourni avec des noyaux précompilés.

CUDA Error: Out of memory

Cela signifie habituellement qu’il n’y a pas assez de mémoire pour enregistrer la scène sur le GPU. Actuellement nous ne pouvons rendre que des scènes qui rentrent dans la mémoire de la carte graphique, et elle est habituellement plus petite que celle du CPU. Voir ci-dessus pour plus de détails.

The NVIDIA OpenGL driver lost connection with the display driver

If a GPU is used for both display and rendering, Windows has a limit on the time the GPU can do render computations. If you have a particularly heavy scene, Cycles can take up too much GPU time. Reducing Tile Size in the Performance panel may alleviate the issue, but the only real solution is to use separate graphics cards for display and rendering.

Une autre solution peut être d’augmenter le time-out (délai d’attente), même si cela va rendre l’interface utilisateur moins réactive pendant le rendu de scènes complexes. En apprendre plus ici.

CUDA error: Unknown error in cuCtxSynchronize()

Une erreur inconnue peut avoir plusieurs causes, mais une possibilité est que c’est une expiration de délai d’attente. Voir la réponse ci-dessus pour des solutions.