The short answer to the first question is… not great.
There are no Vulkan constructs corresponding to those things. Vulkan lets you run compute shaders written in GLSL, HLSL, or any language for which there exists a compiler that outputs SPIR-V. Vulkan doesn’t have its own shader language. Deciding how to break the problem down into separate shader programs each with different workgroup sizes is a challenge.
And the end result performs very poorly compared with tensorflow. However, I haven’t yet put much effort into optimisation, so I expect there’s some easy performance gains to be made.
Vulkan lets you run compute shaders written in GLSL, HLSL, or any language for which there exists a compiler that outputs SPIR-V.
Context: I am interested in writing GPU-code as well (for ML too, but also for custom physic simulation). I also think, that compute-shaders are the way to go. But my intution says, that openCL would be simpler than vulcan.
Question: Have you considered alternatives to vulcan's compute shaders? (e.g. opencl instead of vulcan, or maybe some other ways entirely to run GPU code, such as rust-gpu)
Comments
The short answer to the first question is… not great.
There are no Vulkan constructs corresponding to those things. Vulkan lets you run compute shaders written in GLSL, HLSL, or any language for which there exists a compiler that outputs SPIR-V. Vulkan doesn’t have its own shader language. Deciding how to break the problem down into separate shader programs each with different workgroup sizes is a challenge.
And the end result performs very poorly compared with tensorflow. However, I haven’t yet put much effort into optimisation, so I expect there’s some easy performance gains to be made.
I don’t know anything about WebGL or WebGPU.
Context: I am interested in writing GPU-code as well (for ML too, but also for custom physic simulation). I also think, that compute-shaders are the way to go. But my intution says, that openCL would be simpler than vulcan.
Question: Have you considered alternatives to vulcan's compute shaders? (e.g. opencl instead of vulcan, or maybe some other ways entirely to run GPU code, such as rust-gpu)