Remix.run Logo
flohofwoe 6 days ago

> but that's because this was the first time it is possible

Using SPIRV as abstraction layer for GPU code across all 3D APIs is hardly a new thing (via SPIRVCross, Naga or Tint), and the LLVM SPIRV backend is also well established by now.

LegNeato 6 days ago | parent | next [-]

Those don't include CUDA and don't include the CPU host side AFAIK.

SPIR-V isn't the main abstraction layer here, Rust is. This is the first time it is possible for Rust host + device across all these platforms and OSes and device apis.

You could make an argument that CubeCL enabled something similar first, but it is more a DSL that looks like Rust rather than the Rust language proper(but still cool).

socalgal2 6 days ago | parent [-]

> This is the first time it is possible for Rust host + device across all these platforms and OSes and device apis.

I thought wgpu already did that. The new thing here is you code shaders in rust, not WGSL like you do with wgpu

LegNeato 6 days ago | parent [-]

Correct. The new thing is those shaders/kernel also run via CUDA and on CPU unchanged. You could not do that with only wgpu...there is no rust shader input, (and the thing that enables it rust-gpu which is used here) and if you wrote your code in a shader lang it wouldn't run on the CPU (as they are made for GPU only) or via CUDA.

winocm 6 days ago | parent | prev [-]

LLVM SPIR-V's backend is a bit... questionable when it comes to code generation.