Rendering with both CPU and GPU(OpenCL). Couldn't the GPU just take over the unfinished CPU tile?

As OpenCL is a bit trash right now on blender cycles, we could use some solutions for faster rendering. I render with bigger tiles as AMD can only render fast on bigger tiles but I also enable the CPU cores so I have big tiles on the CPU. But the problem is that the CPU tiles can take a long time to finish while the GPU is finished and does nothing.

It should be possible as both use OpenCL and has to do the same calculations? And that overtaken CPU thread just take over the next tile. Rinse and repeat til the image is finished.

Similar topics have been discussed multiple times, with unfortunately similar results, no action taken :frowning:

I have RX Vega + Threadripper setup, and I would love to be able to use both CPU+GPU.

Thought I was able to render on VEGA with smaller tiles, even raised a bug report, but feedback was that AMD GPU’s never worked on smaller tiles.

So I would be behind supporting somenoe to fix this. Blender Dev team does have a AMD sponsored developer, who did some optimizations (compile speedups) but nothign beyond that… Hope he gets back to improving AMD performance, after all that is what AMD was hoping for when they put in extra funds to Blender Dev funds.

I haven’t looked at the code, but I would expect that one thread would be devoted to “feeding the GPU” while one or more other threads run the CPU-based code. Each tile would be assigned to only one of these threads, which is then responsible for completing it.

I think they are different code paths for CPU and GPU in OpenCL?

If indeed it is one code path, then adding this would be indeed possible. When one tile assigned to the CPU is sub 30% complete, and GPU is done, cancel that 30% and reassign to the GPU to complete it quicker.

Maybe we need a “croudfunding” to improve the OpenCL specifically. Blender Dev team has so many other tasks, that adding this is probably not even close on their list, even tough they have a AMD sponsored Dev who is occupied with other tasks as well :frowning:

This is what I wish it worked like. I just assumed that opencl should work exactly the same for the cpu and gpu and that there is a ‘data dump’ per tile that needs to be calculated.