3 ms·
i’m confused who the intended userbase for this is you either use like a game engine that generates all the platform specific gpu code and shaders for you, or
by taminka 2y ago
i’m confused who the intended userbase for this is
you either use like a game engine that generates all the platform specific gpu code and shaders for you, or you can take advantage of writing all the different gpu specific and shader code yourself (bc you need specific features or can make it faster or some such), i can’t really imagine something in between tbh
and a generalised tool like this is destined to not fit platform specific features that well; for example, i couldn’t find any mention of an interface to use tensor cores, and automatic differentiation w/o a relatively complex expression optimiser is kinda useless for machine learning, where tensor wrt tensor derivatives' dimensionality explodes w/o using an expression optimiser…
it’s kind of the same story as w/ cross platform gpu frameworks: they’re destined to just kind of do everything but badly bc different platforms have different architectures that you can’t map to w/ a single api… imo the best solution remains to have domain specific solutions that generate separate cross platform code solely in that domain...
- MindSpunk 2y agoWhat do you think those game engines use to do the translation? They certainly aren't writing their own compilers and languages, they've got more important things to burn engineer time on. Anyone writing cross platform shaders can consider Slang, even if only for the output targets. The intended user _is_ game engines, and it's a damn good contender in its space. The average pipeline for shader translation right now is HLSL being fed into DXC to generate DXIL for D3D and SPIR-V for Vulkan. That SPIR-V will also get fed into another transpiler (SPIRV-Cross) to spit out shaders for other platforms like Metal. This pipeline is quite fragile, especially in the SPIRV-Cross step, and DXC is on life support with Microsoft integrating a DXIL target into Clang so they don't have to develop a pseudo-cpp frontend anymore.