Are there any good guides on how to debug Cycles GPU?

Occasionally GPU only bugs appear in Cycles and investigating them can be hard without proper debugging tools. From a quick search online, I haven’t been able to find any useful information on how to debug the GPU backends in Cycles, and my attempts to adapt guides on how to debug GPU backends in general hasn’t been particularly useful.

So I’ve come here to ask if anyone has any good guides on how to debug the GPU backends for Cycles?

Note 1: I’m personally interested in debugging CUDA/OptiX on Windows, and Metal Cycles on macOS. However guides for other platforms and/or backends would be useful.
Note 2: When I refer to debugging, I’m mostly concerned about having the ability to place a break point and inspecting the values at that breakpoint.

3 Likes