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

Refactor element type to be decoupled from runtime #1693

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

laggui
Copy link
Member

@laggui laggui commented Apr 25, 2024

Checklist

  • Confirmed that run-checks all script has been executed.

Changes

Decoupled the element types from the runtime
JitBackend<WgpuRuntime<G, F, I>> -> JitBackend<WgpuRuntime<G>, F, I>

  • Removed Compiler associative element types
    • Removed WgslCompiler element type generics
  • Added generics for int and float types to JitBackend (and the kernels where required)
  • Added FloatKind and IntKind enums for different precisions
  • Removed FullPrecision runtime and compiler types

Testing

All unit tests have passed with run-checks

@laggui laggui requested a review from nathanielsimard April 25, 2024 14:50
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

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

Project coverage is 86.41%. Comparing base (a1bd14c) to head (a5679d6).
Report is 2 commits behind head on main.

Files Patch % Lines
crates/burn-jit/src/codegen/dialect/gpu/shader.rs 50.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/matmul/simple.rs 85.71% 2 Missing ⚠️
crates/burn-jit/src/kernel/matmul/tiling2d.rs 86.66% 2 Missing ⚠️
crates/burn-wgpu/src/compiler/wgsl/compiler.rs 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1693      +/-   ##
==========================================
- Coverage   86.43%   86.41%   -0.03%     
==========================================
  Files         696      696              
  Lines       80967    81122     +155     
==========================================
+ Hits        69986    70103     +117     
- Misses      10981    11019      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one change, but LGTM

crates/burn-jit/src/bridge.rs Outdated Show resolved Hide resolved
@laggui laggui requested a review from nathanielsimard April 26, 2024 12:02
@nathanielsimard nathanielsimard merged commit ce2429e into main Apr 26, 2024
15 checks passed
@nathanielsimard nathanielsimard deleted the refactor/burn-jit/element-type branch April 26, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants