3 ms·
> GPUs are Turing complete computers. > what's missing from existing GPU languages that prevents this kind of flexibility? GPUs contain many Turing complete co
by exDM69 2y ago
> GPUs are Turing complete computers.
> what's missing from existing GPU languages that prevents this kind of flexibility?
GPUs contain many Turing complete computers that are orchestrated by a non-Turing complete fixed function logic block which interprets your command buffers (as opposed to shader code). That component is different in every architecture.
The work graphs are about creating a scheduling system for the fixed function component.
You can't effectively do this in shaders only.
Unreal Engine's "Nanite" system uses something like a work graph in a shader. It is full of pitfalls and gotchas to make it work but you can read about it in the white paper.
The core issue here is that without workgraphs, each compute shader needs to write out its results to DRAM and finish all work it is doing. Then another compute shader is dispatched and it reads back all the results from DRAM.
With work graphs you can make a producer/consumer type of setup where a compute shader's outputs are fed as input to another compute shader without going through DRAM. It also removes the need to know how much output the producer produces ahead of time, no need to preallocate a buffer for the intermediate results.
DRAM bandwidth is typically the bottleneck in modern graphics so this makes sense.