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/Split Operator #2490

Merged
merged 35 commits into from
Nov 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
242094e
Create high-level function signatures for `split()` and `split_with_s…
agelas Nov 14, 2024
64df3d9
Add checks for `split()` and `split_with_sizes()`
agelas Nov 14, 2024
6e2ca04
Remove pointless negative checks, usize is an int
agelas Nov 14, 2024
21d06fe
Add element-type specific function signatures
agelas Nov 14, 2024
4e30256
Implement split and split_with_sizes for tch backend
agelas Nov 14, 2024
d4cf026
Add split ops to burn-autodiff
agelas Nov 14, 2024
3cfdd32
Add split ops to list of basic operations in burn-book
agelas Nov 14, 2024
5a14745
Add fallbacks for split and split_with_size since a few backends dont…
agelas Nov 14, 2024
185703f
Cleanup split_with_sizes and fix arguments
agelas Nov 14, 2024
2b1c152
Clippy fixes
agelas Nov 14, 2024
01272f1
Finish todos in tensor.rs
agelas Nov 14, 2024
334fa0b
Add documentation to split functions
agelas Nov 14, 2024
bd5343f
Small consistency/grammar fixes for chunk
agelas Nov 14, 2024
236b919
Punctuation fix
agelas Nov 14, 2024
c5d08ee
Small doc fixes and change to split_with_sizes
agelas Nov 14, 2024
824cb30
Add split functions to float, int, and bool BasicOps impls
agelas Nov 14, 2024
1deee50
Add split functions to int, bool, and quantized tensors
agelas Nov 14, 2024
a99a306
Minor doc + code fixes
agelas Nov 15, 2024
9ac5fc0
Add documentation
agelas Nov 15, 2024
3093b5c
Start adding tests
agelas Nov 15, 2024
36a6ff5
Try to get this to compile
agelas Nov 15, 2024
3e790df
Fix docs and add examples
agelas Nov 15, 2024
d1624f0
Get initial tests to a working state
agelas Nov 15, 2024
d647a9e
Fix doc tests
agelas Nov 15, 2024
54ef092
Add more split tests
agelas Nov 15, 2024
2aedd20
Add more tests for 3D tensor splitting
agelas Nov 15, 2024
b3ed77a
Check with full dims so no indexing panic
agelas Nov 15, 2024
1775c1a
Correct flow of check
agelas Nov 15, 2024
7ddab38
Specify which panic to expect in tests
agelas Nov 15, 2024
3d064f8
Add split_with_sizes tests
agelas Nov 15, 2024
9fb3aad
Small fix to chuk tests
agelas Nov 15, 2024
dfb571a
Resolve merge conflicts
agelas Nov 19, 2024
e98240a
Fix redundant closure
agelas Nov 19, 2024
86f5d31
Fix redunant closure even more
agelas Nov 19, 2024
fe8bd67
Resolve merge conflict
agelas Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Small fix to chuk tests
agelas committed Nov 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9fb3aad2881dd76bdd3a238af99842c9eabc2614
1 change: 1 addition & 0 deletions crates/burn-tensor/src/tests/ops/chunk.rs
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ mod tests {
use alloc::vec::Vec;
use burn_tensor::{Int, Shape, Tensor, TensorData};

#[test]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this was accidentally left out in #998

fn test_chunk_evenly_divisible() {
let tensors: Vec<Tensor<TestBackend, 1, Int>> =
Tensor::arange(0..12, &Default::default()).chunk(6, 0);