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

Feat/shared sum #2737

Merged
merged 7 commits into from
Jan 24, 2025
Merged

Feat/shared sum #2737

merged 7 commits into from
Jan 24, 2025

Conversation

maxtremblay
Copy link
Contributor

I imported the shared_sum reduction from cubecl and added it with autotune.

backend-comparison/benches/reduce.rs Outdated Show resolved Hide resolved
crates/burn-jit/src/kernel/reduce/base.rs Outdated Show resolved Hide resolved
crates/burn-jit/src/kernel/reduce/base.rs Show resolved Hide resolved
) -> Result<JitTensor<Run>, String> {
crate::kernel::reduce::reduce::<Run, E, E, Sum>(
input,
crate::kernel::reduce::ReduceStrategy::Autotune,
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure i understand, calling sum_chained during the autotune of sum-full will trigger the autotune of sum-dim, which may trigger several autotunes during the chain if the various dims are not similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly!

Comment on lines 15 to +18
/// Key for reduce dim operations
Reduce(ReduceAutotuneKey),
/// Key for sum operations
Sum(SumAutotuneKey),
Copy link
Member

Choose a reason for hiding this comment

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

Is SumDim a Reduce or a Sum? It's getting a bit confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the reduce kernel, there is no function or trait or type or anything really called SumDim or something similar.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 89.69072% with 10 lines in your changes missing coverage. Please review.

Project coverage is 83.58%. Comparing base (245fbcd) to head (7611ffd).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/burn-jit/src/kernel/reduce/base.rs 82.05% 7 Missing ⚠️
crates/burn-jit/src/kernel/reduce/tune.rs 98.18% 1 Missing ⚠️
crates/burn-jit/src/ops/float_ops.rs 0.00% 1 Missing ⚠️
crates/burn-jit/src/tune_key.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2737      +/-   ##
==========================================
- Coverage   83.91%   83.58%   -0.34%     
==========================================
  Files         821      824       +3     
  Lines      106890   108340    +1450     
==========================================
+ Hits        89702    90553     +851     
- Misses      17188    17787     +599     

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

@maxtremblay maxtremblay merged commit 7ddb5af into main Jan 24, 2025
11 checks passed
@maxtremblay maxtremblay deleted the feat/shared-sum branch January 24, 2025 17:17
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