Layers All the Way Down: The Untold Story of Shader Compilation

1 pointsposted 10 hours ago
by davexunit

1 Comments

tyfighter

10 hours ago

> The fundamental problem here is that no standardized shader ISA or even bytecode exists, and there is no material incentive for any vendor to create or agree upon one.

It's not really a material incentive issue. GPU instructions are "microcode". The instructions can contain timing and dependency information that is specific to the underlying microarchitecture. That information is not standardizable, and even if it was, it just kicks the can down the road by adding yet another shader program translation step from something "standard" to hardware specific. CPUs translate (or fetch) ISA to microcode while running, but that's a chip area cost. If every SM/CU needed a hardware ISA to microcode translator, that would be fewer SMs/CUs per GPU. My opinion is that GPUs need custom microinstruction ISAs to stay competitive with each other, and that will always require some form offline shader translation.