OpenCL render somtime idles on one tile with BPT
Open, NormalPublic

Description

System Information
win7 x64, Vega 64, driver 17.9.1

Blender Version
Broken: latest master since a week at least

Short description of error
After rendering for some seconds with BPT, the gpu idles, but the tile will never finish.

Exact steps for others to reproduce the error
Render this scene from barbershop (10_03_B - Agent dodges) https://cloud.blender.org/p/agent-327/591ac3cabb3ea141675bbaf2 with OpenCL, the first tile will render for 1-2 seconds with 100% GPU usage and then go idle, never finishing it.

Details

Type
Bug
Brecht Van Lommel (brecht) claimed this task.

Probably my fault. I couldn't redo with NVidia OpenCL yet, will try AMD later.

Brecht Van Lommel (brecht) triaged this task as Normal priority.Sep 28 2017, 2:23 AM

I can't reproduce this issue with an RX 480, driver 17.9.1 and Windows 10. I tried using the default tile size in this file and bigger ones like 256x256 and 1024x1024.

I also looked over the relevant code changes but couldn't find anything suspicious. I would guess it's some issue with a wrong ray state that causes the path iteration to never finish, but would expect that kind of problem to happen on any GPU.

Rendering the scene lightning.blend in the link above (https://cloud.blender.org/p/agent-327/591ac3cabb3ea141675bbaf2), tested with latest master and 17.11.2 on a VEGA 64, OpenCL system memory usage skyrockets at 27.6:


while CUDA and CPU stay both at around 16GB system memory usage

Vega 64 has only 8GB and cycles reports about 10GB peak memory usage, so I could understand a difference around 2GB (the maximal size of buffers in latest OpenCL code) showing the driver allocating system memory. But why nearly 12GB? Of course the GPU will then idle most of the time, waiting for the system memory.
@Brecht Van Lommel (brecht) did it successfully render the scene lightning.blend in a normal time on the RX480?
Another point is, why is as much system memory kept used while doing GPU rendering? Couldn't the data be freed when everything has been written to the GPU?