← All ideas
  • Published 24 Nov 2019

Cycles - all CPU cores rendering single tile when CUDA is used

Hello - there is something bugging my for a long time when rendering in CUDA mode, with CPU joining GPU in effort. I am not skilled enough to experiment myself with a code, but I would like to share the idea - maybe someone pick ut up and do some good with it.

Problem:

When setting Cycles to render using CUDA, and enables both CPU and GPU as active devices, blender is rendering simultaneusly a tiles for GPU and each CPU core . CPU cores are much slower than GPU, so around end of rendering this is causing bottleneck, if GPU is finished, but image is still hanging on tiles being rendered by CPU individual cores. This is especially troublesome, when render time for whole image is relatively short, then its easy to lost a lot of CUDA rendering advantage when render has to wait for CPU to finish its task. With new multicore CPUs available on the market, I suppose the problem will be getting more and more noticeable. Easy to imagine that 128 thread CPU, will acquire majority of tiles in first iteration, leaving only few for GPU, so in fact individual CPU thread performance will be major factor dictating frame render time. Huge waste of compute power in my opinion.

Proposition:

I believe that solutions is to make Cycles to render in CUDA CPU+GPU mode in following way:

  • one tile for GPU
  • one tile for WHOLE CPU (all cores and threads performing "progressive refine" on single tile).

My personal experiments shows that performance penalty for CPU rendering in progressive mode vs each thread rendering separated tile is ~2,5%. This way it could eliminate impact of individual CPU thread performance and inefficiency it is causing when cooperating with GPU.

Hope that makes sense. If there is no serious technical issues with enabling that, I believe it could help with lot's of cases, and should not cause any damage for rest.

66.7%

Development Status: Open

Upvote 4 Downvote 2
jozef.sroczynski
24 Nov 2019

1 Comment

iff the accumulation buffers for Cycles can support such collective incremental rendering on the CPU, and iff there is no other issue with thread-safety, then it is certainly an interesting concept you propose. There is yet another option: Cycles could subdivide the one bigger GPU-friendly tile in many smaller CPU-friendly tiles.

(Please also look for duplicate requests... there are many)

1