burn icon indicating copy to clipboard operation
burn copied to clipboard

CubeCL first iteration

Open louisfd opened this issue 9 months ago • 1 comments

Part of #1665

Since the goal of CubeCL is to rewrite all our JIT kernels with a readable rusty syntax, I started by supporting all the basic syntax to parse it into to the JIT intermediate representation, and figured out an enjoyable type system for element types, with support for easy casting. To look at examples, navigate to crates/burn-cube/tests where kernels marked with #[cube] are tested against their gpu! macro counterparts.

Next steps:

  • rename gpu macro to cube_inline (trivial, but didn't want to make this PR harder to read)
  • support vectorization better
  • migrate jit codegen stuff to cube

louisfd avatar May 11 '24 21:05 louisfd

Codecov Report

Attention: Patch coverage is 78.13688% with 460 lines in your changes are missing coverage. Please review.

Project coverage is 86.41%. Comparing base (1073752) to head (2bf7db9). Report is 6 commits behind head on main.

Files Patch % Lines
crates/burn-cube/tests/cast_elem.rs 58.16% 64 Missing :warning:
crates/burn-cube/src/operation/binary.rs 49.41% 43 Missing :warning:
crates/burn-cube/tests/function_call.rs 68.60% 27 Missing :warning:
crates/burn-cube/tests/trait.rs 81.61% 25 Missing :warning:
crates/burn-cube-macros/src/analysis.rs 85.71% 24 Missing :warning:
crates/burn-cube-macros/src/codegen/function.rs 65.67% 23 Missing :warning:
crates/burn-cube/src/element/conversion.rs 0.00% 22 Missing :warning:
crates/burn-cube/src/element/bool.rs 25.00% 18 Missing :warning:
crates/burn-cube/src/element/uint.rs 40.00% 18 Missing :warning:
crates/burn-cube/src/operation/cmp.rs 56.75% 16 Missing :warning:
... and 22 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1756      +/-   ##
==========================================
- Coverage   86.61%   86.41%   -0.21%     
==========================================
  Files         700      734      +34     
  Lines       83423    85575    +2152     
==========================================
+ Hits        72258    73947    +1689     
- Misses      11165    11628     +463     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 13 '24 14:05 codecov[bot]