Live data from Hacker News

CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

github.com

11–20 of 45 posts

Re: CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

#12

Where is the Metal love…

It also compiles directly to MSL, it is just missing from the post title.

No it compiles indirectly through wgpu, which means it doesn’t have access to any Metal extensions not exposed by the wgpu interface.

Re: CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

#14
post #2

Very interesting project! I am wondering how it compare against OpenCL, which I think adopts the same fundamental idea (write once, run everywhere)? Is it about CUbeCL's internal optimization for Rust that happens at compile time?

This appears to be single source which would make it similar to SYCL.

Given that it can target WGPU I'm really wondering why OpenCL isn't included as a backend. One of my biggest complaints about GPGPU stuff is that so many of the solutions are GPU only, and often only target the vendor compute APIs (CUDA, ROCm) which have much narrower ecosystem support (versus an older core vulkan profile for example).

It's desirable to be able to target CPU for compatibility, debugging, and also because it can be nice to have a single solution for parallelizing all your data heavy work. The latter reduces mental overhead and permits more code reuse.

Re: CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

#17
post #2

Very interesting project! I am wondering how it compare against OpenCL, which I think adopts the same fundamental idea (write once, run everywhere)? Is it about CUbeCL's internal optimization for Rust that happens at compile time?

This appears to be single source which would make it similar to SYCL. Given that it can target WGPU I'm really wondering why OpenCL isn't included as a backend. One of my biggest complaints about GPGPU stuff is that so many of the solutions are GPU only, and often only target the vendor compute APIs (CUDA, ROCm) which have much narrower ecosystem support (versus an older core vulkan profile for example). It's desirab…

Makes sense. And indeed, having OpenCL as a backend would be a very interesting extension.

Re: CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

#19
post #15

Earlier quoted context omitted.

Why would anyone love something born out of pure spite for industry standards?

For the same reason CUDA and ROCm are supported.

Apple is known to be not that great contributor to open source, unlike Nvidia, AMD, Intel.

Re: CubeCL: GPU Kernels in Rust for CUDA, ROCm, and WGPU

#20
I'd recommend having a "gemm with a twist" [0] example in the README.md instead of having an element-wise example. It's pretty hard to evaluate how helpful this is for AI otherwise.

[0] For example, gemm but the lhs is in fp8 e4m3 and rhs is in bf16 and we want fp32 accumulation, output to bf16 after applying GELU.

Post reply on HN