Sub topic 8
CPU versus GPU rendering
Prerequisites
This chapter assumes that you can navigate Blender’s Properties editor, create a material with Principled BSDF, add a camera and lights, and render a still image. You should also know how to switch a scene to Cycles. The examples use Blender 4.x and focus on Cycles device selection.
What the CPU and GPU do
The CPU, or central processing unit, is the general-purpose processor in your computer. The GPU, or graphics processing unit, is a processor designed to perform many similar calculations at the same time.
Cycles can render with either device. A CPU often has fewer but more flexible cores. A GPU usually has many smaller cores and can calculate suitable rendering workloads in parallel. This makes a supported GPU faster for many Cycles scenes, but speed depends on the scene, the GPU, and the selected backend.
EEVEE already uses the GPU as part of its real-time rasterization design. Cycles gives you an explicit device choice because path tracing can run on the CPU, the GPU, or sometimes both.
| Device | Strength | Common limitation |
|---|---|---|
| CPU | Large system memory and broad compatibility | Often slower for path tracing |
| GPU | High parallel performance | Limited VRAM and hardware support |
| CPU plus GPU | Uses available processing resources | Can be slower if the CPU delays the GPU |
Enabling a Cycles GPU
First enable a compute device in Edit > Preferences > System > Cycles Render Devices. The available choices depend on your hardware and operating system. Examples include CUDA or OptiX for NVIDIA devices, HIP for AMD devices, Metal for Apple devices, and oneAPI for some Intel devices.
Then select the device for the scene in Render Properties > Device. The choices are usually CPU and GPU Compute. Choosing GPU Compute does not install a driver or enable a device that is disabled in Preferences.
import bpy
scene = bpy.context.scene
scene.render.engine = 'CYCLES'
scene.cycles.device = 'GPU'
scene.cycles.samples = 128
scene.cycles.use_denoising = TrueThe script selects GPU rendering, but it cannot replace the Preferences step. If no compatible device is enabled there, Cycles may use the CPU or report an unavailable device.
Memory, fallbacks, and scene limits
GPU rendering stores scene data, textures, acceleration structures, and render buffers in video memory, often called VRAM. A large texture or complex geometry can exceed the GPU’s VRAM even when the computer has plenty of system RAM.
Typical symptoms include an allocation error, a failed render, or a fallback to the CPU, depending on the backend and Blender version. Reduce texture sizes, simplify geometry, use instancing, or render smaller tiles when appropriate. Do not assume that adding a second GPU automatically combines their memory. Many setups treat each GPU’s memory separately.
The CPU can be a useful fallback for testing. If a scene renders on the CPU but fails on the GPU, compare memory use, unsupported features, and driver status before changing the scene.
> callout warning > Benchmark the actual scene. A GPU may be much faster for a large path-traced image, while a small scene can spend much of its time loading data or coordinating work.
Comparing performance fairly
Use the same scene, resolution, samples, denoising settings, and output format for each test. Render one representative frame rather than relying on a simple viewport preview. Record the render time and watch memory use.
GPU rendering is usually most useful when the GPU has enough VRAM and the scene contains work that parallelizes well. CPU rendering remains valuable for compatibility, large-memory scenes, debugging, and machines without a supported GPU.
blender -b scene.blend -E CYCLES -o //render_#### -f 1The command selects Cycles for the background render. Device selection still comes from the saved Blender preferences and the scene settings.
Exercise
A Cycles scene renders successfully on the CPU but fails on the GPU. What should you check first?
Show answer
Check that a compatible device is enabled in Preferences, then check whether the scene and its textures fit in the GPU’s VRAM. Also verify the graphics driver and the selected compute backend.