Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CubeCL: Compute Language Extension in Rust for Multi-target GPU kernels #1665

Open
3 of 6 tasks
louisfd opened this issue Apr 19, 2024 · 0 comments
Open
3 of 6 tasks
Assignees
Labels
accessibility Everything that is related to making Burn more accessible documentation Improvements or additions to documentation performance Anything related to performance very hard Reserved for framework experts: Extremely challenging.

Comments

@louisfd
Copy link
Member

louisfd commented Apr 19, 2024

The current JIT representation is very practical for targeting multiple GPU languages; however the kernels are very hard to read and maintain as it is composed of many declarative macros and is too close to assembly (for instance, there's no support for complex one-liners that need operation priority).

Thus, we will be developing a new language using procedural macros, that feels like writing plain Rust but compiles to a GPU language (using a backend's compiler and runtime like we have for wgpu at the moment). We call it CubeCL (Cube Compute Language), as a reference to the topology of workgroups often present in GPU languages.

I will be working for several weeks on this, migrating (again) and optimizing our jit kernels along the way. When it's done it must also be well-documented because it shall become the standard way of writing custom kernels in user space.

Here's a sketch of the steps to achieve (despite lots of uncertainty still):

  • Static analysis of Cube basic code
  • Codegen of JIT representation
  • Support of all operators
  • Support of GPU-specific instructions
  • Migrate & optimize kernels
  • Write an official doc
@louisfd louisfd added documentation Improvements or additions to documentation performance Anything related to performance very hard Reserved for framework experts: Extremely challenging. accessibility Everything that is related to making Burn more accessible labels Apr 19, 2024
@louisfd louisfd self-assigned this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Everything that is related to making Burn more accessible documentation Improvements or additions to documentation performance Anything related to performance very hard Reserved for framework experts: Extremely challenging.
Projects
Status: In Progress
Development

No branches or pull requests

1 participant