How to fix "CUDA out-of-memory" error

Issue

The rendering process can stop with the following error in the log:

CUDA error: unable to allocate enough memory to perform the requested operation (out-of-mem)

[GPU Light Cache ]could not allocate buffer of size

Could not allocate texture buffer on device


What this error means

This error message indicates that a project is too complex to be cached in the GPU's memory. Each project contains a certain amount of data that must be uploaded either to the RAM (when the CPU engine is chosen) or to the VRAM (the GPU's memory, when the GPU engine is set to CUDA or RTX).

GPUs tend to have a much more limited amount of memory compared to the amount of RAM a computer has. Sometimes a project can be too large and fail to be fully uploaded to the VRAM. Some factors that play a role  are the complexity of the geometry, heavy use of high-resolution textures, the render settings and more.

 

How to resolve it

  1. Optimize your project to use less memory. Review scene optimization strategies in the guide Memory usage optimizations for GPU rendering.
  2. Upgrade your GPU device to one with a larger GPU memory. A device with larger GPU memory can accommodate bigger scenes and textures.
  3. Use the GPU device with the largest amount of memory available. If more than one GPU device is available on the machine, render the scene only with the device that has the largest GPU memory available.

 

Related resources

Was this article helpful?
0 out of 1 found this helpful