How does this relate to tracel-ai/cubecl #19
-
In the transition announcement, tracel-ai/cubecl was brought up as
What are / will be the key differences between the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I can speak to this at least a bit, but I expect @eddyb and @LegNeato can elaborate. Having not used CubeCL myself I'm basing my comparison on their readme. The big difference I see here is that With Now like I said earlier I've never used CubeCL, but it seems the project is using a proc macro that parses the contained Rust code using That said I bet the barrier to entry for CubeCL is lower. Since the runtime is integrated, there's no GPU context to set up. With Anyway - that's my interpretation of the situation. |
Beta Was this translation helpful? Give feedback.
-
Yep, basically it! They key difference to me is "annotated code". Which means you can only use code specifically written with CubeCL in mind. With rust-gpu, one can use existing rust code for the gpu (no_std and no alloc currently). There are of course differences between CubeCL's parsing / proc macro implementation vs rust-gpu's compiler backend. The compiler back end is strictly more powerful, but it's also harder to use vs just slapping on a proc macro. |
Beta Was this translation helpful? Give feedback.
I can speak to this at least a bit, but I expect @eddyb and @LegNeato can elaborate. Having not used CubeCL myself I'm basing my comparison on their readme.
The big difference I see here is that
rust-gpu
compiles Rust code to SPIR-V. What this means is that it is runtime agnostic. If your runtime can interpret SPIR-V, then you can userust-gpu
to write your shaders/compute in Rust. Personally usewgpu
for graphics work, but you can use Vulkan, Metal, DX - literally any "runtime" that accepts SPIR-V.With
rust-gpu
you can use just about all the bells and whistles ofno_std
Rust (like importing external crates, defining types, traits, etc).rust-gpu
accomplishes this by using arustc
compil…