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 - JIT] Gather Scatter new implementations #1356

Merged
merged 9 commits into from
Feb 26, 2024

Conversation

nathanielsimard
Copy link
Member

@nathanielsimard nathanielsimard commented Feb 23, 2024

Refactor gather scatter to use the new GPU agnostic internal represetation.

@nathanielsimard nathanielsimard marked this pull request as draft February 23, 2024 15:53
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

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

Project coverage is 85.75%. Comparing base (b256c04) to head (3059589).
Report is 13 commits behind head on main.

Files Patch % Lines
...urn-wgpu/src/codegen/dialect/gpu/procedure/read.rs 16.66% 20 Missing ⚠️
crates/burn-wgpu/src/codegen/dialect/gpu/branch.rs 0.00% 4 Missing ⚠️
...tes/burn-wgpu/src/codegen/dialect/gpu/operation.rs 50.00% 4 Missing ⚠️
...tes/burn-wgpu/src/codegen/dialect/wgsl/compiler.rs 42.85% 4 Missing ⚠️
crates/burn-wgpu/src/kernel/index/scatter.rs 97.48% 4 Missing ⚠️
crates/burn-wgpu/src/fusion/tracing/builder.rs 0.00% 3 Missing ⚠️
...urn-wgpu/src/codegen/dialect/gpu/procedure/base.rs 33.33% 2 Missing ⚠️
crates/burn-wgpu/src/codegen/dialect/gpu/scope.rs 92.85% 2 Missing ⚠️
...burn-wgpu/src/codegen/dialect/wgsl/instructions.rs 60.00% 2 Missing ⚠️
crates/burn-wgpu/src/kernel/index/gather.rs 98.03% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1356      +/-   ##
==========================================
+ Coverage   78.86%   85.75%   +6.88%     
==========================================
  Files         561      585      +24     
  Lines       62781    65541    +2760     
==========================================
+ Hits        49515    56207    +6692     
+ Misses      13266     9334    -3932     

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

@nathanielsimard nathanielsimard marked this pull request as ready for review February 26, 2024 17:42
@nathanielsimard nathanielsimard changed the title Refactor/jit/index [Refactor - JIT] Gather Scatter new implementations Feb 26, 2024
Copy link
Member

@louisfd louisfd left a comment

Choose a reason for hiding this comment

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

I have 2 comments, but I'm not sure about them. The rest is fine!

},
Instruction::Index { lhs, rhs, out } => {
let item = out.item();
f.write_fmt(format_args!("{out} = {item}({lhs}[{rhs}]);\n"))
Copy link
Member

Choose a reason for hiding this comment

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

Not sure, but shouldn't item be elem ?

Copy link
Member Author

Choose a reason for hiding this comment

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

No not here


gpu!(scope, if(should_skip).then(|_| {
// Nothing to do.
}).else(|scope| {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the DSL but is it necessary to have
if x nothing else stuff instead of if !x stuff

Copy link
Member Author

Choose a reason for hiding this comment

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

not is not yet supported, should be updated when is

@nathanielsimard nathanielsimard merged commit bdec8d5 into main Feb 26, 2024
15 checks passed
@nathanielsimard nathanielsimard deleted the refactor/jit/index branch February 26, 2024 22:20
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