Sub topic 8
CPU versus GPU rendering
This chapter assumes you can render a still with F12, open the Properties editor, and run a short script from Blender's Scripting workspace. It covers the hardware choice inside Cycles: which processor does the work, how to enable it, and what goes wrong.
Where the hardware choice applies
Cycles can run on the CPU, on one or more GPUs, or on both together. EEVEE has no such choice. It draws with the graphics API (OpenGL, or Vulkan/Metal in newer versions) and always needs a working GPU, even for background renders. So "CPU or GPU?" is a Cycles question.
The two processors take the same input and run the same path-tracing algorithm. The difference is how they run it.
- A CPU has a few powerful cores (typically 8 to 64). Each core handles complex, branching code well.
- A GPU has thousands of simpler cores. Path tracing fires millions of rays that are largely independent of each other, so this fits the GPU well.
On a modern consumer GPU, a typical scene renders several times faster than on a typical consumer CPU. The gap varies with the scene, so treat any single speedup figure as a rough guide.
Enabling a GPU
Setting Device to GPU Compute in Render Properties > Cycles is not enough. The Render Properties panel only shows the option when a compute device is available. The device itself is chosen in Preferences > System > Cycles Render Devices.
- Open Edit > Preferences > System.
- Under Cycles Render Devices, pick a backend.
- Tick the GPU or GPUs you want to use.
- Back in Render Properties, set Device to GPU Compute.
The backends depend on your hardware:
| Backend | Hardware | Notes |
|---|---|---|
| CUDA | NVIDIA | Widest support across NVIDIA generations |
| OptiX | NVIDIA RTX | Uses the RT cores for ray tracing, usually faster than CUDA. Also provides the OptiX denoiser |
| HIP | AMD | Needs a supported Radeon GPU and driver |
| Metal | Apple silicon, supported AMD GPUs on macOS | Included with macOS builds |
| oneAPI | Intel Arc | Needs the Intel driver |
Supported GPU models and minimum driver versions change between Blender releases. Check the manual for your version before buying hardware or blaming Blender for a missing device.
If your GPU does not appear, the cause is almost always the driver, an unsupported card, or the wrong backend. It is rarely a Blender setting.
Doing it from Python
You often need this for render farms and unattended machines, where nobody can click through Preferences.
import bpy
prefs = bpy.context.preferences.addons['cycles'].preferences
prefs.compute_device_type = 'OPTIX' # or 'CUDA', 'HIP', 'METAL', 'ONEAPI'
prefs.get_devices() # refresh the device list
for device in prefs.devices:
device.use = device.type != 'CPU'
print(device.name, device.type, device.use)
scene = bpy.context.scene
scene.render.engine = 'CYCLES'
scene.cycles.device = 'GPU'Assigning a backend your machine does not support raises a TypeError, so run the script on the target machine. The loop prints every device Blender found. Check that output, because a render that silently falls back to the CPU is a common surprise.
Preferences are stored per user, not in the .blend file. A scene saved with GPU Compute on your workstation falls back to the CPU on a machine where no GPU is enabled.
Choosing devices from the command line
The -- --cycles-device option selects the backend for a background render. Everything after the standalone -- goes to Cycles instead of Blender's main parser.
blender -b scene.blend -E CYCLES -o //render_#### -f 1 -- --cycles-device OPTIXValid values include CPU, CUDA, OPTIX, HIP, METAL and ONEAPI. You can combine a GPU backend with the CPU, as in OPTIX+CPU. Blender processes arguments in order, so the engine and output path must come before -f, as in the command above.
Memory: the limit that decides many projects
Speed is only half the comparison. Memory often decides the question.
- CPU rendering uses system RAM. A workstation with 64 GB or more can hold very large scenes.
- GPU rendering uses the card's video memory (VRAM), commonly 8 to 24 GB on consumer cards. The whole scene needs to fit: geometry, textures, and the acceleration structure used to find ray hits.
If a scene is too big for VRAM, the render stops with an out-of-memory error. Some data, such as image textures, can spill into system RAM on some backends, but at a speed cost. You should not plan around this.
Multiple GPUs share the work, but their memory is not added together. Each card needs the full scene, so two 12 GB cards still limit you to a 12 GB scene. NVLink can pool memory on supported cards, but it is an advanced setup and not a general feature.
To reduce VRAM use:
- Lower texture resolution, or use 2K textures on distant objects.
- Use instances or collection instances for repeated objects.
- Lower the viewport and render subdivision levels (Subdivision Surface modifier, Adaptive Subdivision).
- Remove objects hidden from the camera (a render-time visibility toggle helps).
- Apply the Simplify settings in Render Properties > Simplify.
Hybrid CPU and GPU rendering
You can tick the CPU alongside the GPU in Preferences. Cycles then splits the work across both. This helps most when the CPU is strong and the GPU is modest. It can also slow a render down: with a very fast GPU and a weak CPU, the extra overhead of coordinating the two can cost more than the CPU adds. Test your own machine with a representative scene before you make it a default.
Interactive use and the display GPU
If your only GPU also draws the Blender interface, a heavy Cycles render makes the viewport sluggish. Some people leave one card out of the render selection to keep it free for the interface, or limit the viewport render samples. This is a comfort setting, not a correctness issue.
Feature and result differences between devices
For most scenes the CPU and GPU produce visually equivalent images. They do not produce identical pixels. The noise pattern differs, so a CPU frame and a GPU frame of the same scene do not match pixel for pixel. Mixing devices across the frames of one animation can show a faint change in noise character. For production animation, use the same device configuration for every frame.
Two further points to check:
- Shader support. Open Shading Language (OSL) script nodes have historically been CPU-only. Check the manual for your Blender version before relying on them with a GPU.
- Denoiser availability. OptiX denoising needs an NVIDIA RTX card. OpenImageDenoise runs on the CPU, and newer builds can run it on supported GPUs. See the denoising chapter for the quality trade-offs.
A decision flow
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| **GPU Compute** is greyed out or missing | No backend or device enabled in Preferences | Pick a backend and tick the GPU |
| Render is as slow as CPU despite GPU setting | Script or file set `GPU`, but no device is enabled, so Cycles fell back | Print `prefs.devices` and check `use` |
| "CUDA error: out of memory" or similar | Scene larger than VRAM | Reduce texture and geometry load, or switch to CPU |
| Interface freezes during render | Display GPU is also rendering | Exclude it or lower samples while working |
| Background render on a server ignores GPU | Preferences are per user and not in the `.blend` | Set devices in a script or use `--cycles-device` |
Exercise
A scene renders in 40 seconds on your GPU at your workstation. After you copy the file to a render server with an enabled GPU in a different user account, the render takes 12 minutes with no error. Name two likely causes and how you would confirm each.
Show answer
First, the server's user preferences may have no compute backend or device enabled, so Cycles fell back to the CPU even though the file says GPU. Confirm by running a script that prints prefs.devices and each device's use flag, or by starting the render with -- --cycles-device OPTIX (or the right backend) and checking the log. Second, the server's GPU may be much slower, or hybrid CPU+GPU may be enabled on a weak CPU. Confirm by timing the same frame with GPU only, CPU only, and hybrid.
Exercise
You have two 12 GB GPUs and a scene that needs 16 GB of memory. Will enabling both cards let the scene render on the GPUs? Explain.
Show answer
No. Each GPU holds a full copy of the scene, so the memory is not added together, and the limit stays 12 GB per card. You must reduce the scene to fit in 12 GB, use a card with more VRAM, or render on the CPU with enough system RAM.