Shading Languages & CubeCL: GPU Programming in Rust (Part 2)
In this video, we explore popular shading languages—WGSL (WebGPU), GLSL (OpenGL), HLSL (Direct3D), and MSL (Metal)—and dive into the Single Source method with CUDA, ROCm, and OpenCL. We then shift to CubeCL, a Rust-based GPU runtime, and discuss how CubeCL allows writing GPU kernels directly in Rust. We'll cover: - The architecture of CubeCL and its runtimes (cubecl_wgpu & cubecl_cuda) - Key constructs like `ComputeClient`, `ComputeServer`, and `Channel` - Translating Rust kernels to WGSL with an example of a GELU kernel If you're interested in GPU programming, Rust, or learning about CubeCL, this video is for you! GitHub: https://github.com/tracel-ai/cubecl #gpu #programming #rust #compiler #heterogeneous #coding 00:00:00 Recap of CubeCL 00:01:40 Quick intro to shading languages and gpu programming 00:06:15 Single source programming models for the GPU 00:08:50 Super High-level overview of CubeCL's architecture 00:10:45 CubeCL's GELU example walkthrough 00:17:02 Some WebGPU concepts (adapter, device, queue) 00:18:40 Continuation of GELU walkthrough 00:24:21 Expanding CubeCL macros 00:26:00 Launching GPU kernels with CubeCL 00:44:30 CubeCL IR vs WGSL (side by side) comparison 00:46:45 Summary Corrections: 06:32 OpenCL is not strictly a single-source programming model. However, SYCL is emerging as a promising C++ single-source model for heterogeneous programming on top of OpenCL.
Download
0 formatsNo download links available.