-
Notifications
You must be signed in to change notification settings - Fork 489
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
Feat/Split Operator #2490
Changes from all commits
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 64df3d9
Add checks for `split()` and `split_with_sizes()`
agelas 6e2ca04
Remove pointless negative checks, usize is an int
agelas 21d06fe
Add element-type specific function signatures
agelas 4e30256
Implement split and split_with_sizes for tch backend
agelas d4cf026
Add split ops to burn-autodiff
agelas 3cfdd32
Add split ops to list of basic operations in burn-book
agelas 5a14745
Add fallbacks for split and split_with_size since a few backends dont…
agelas 185703f
Cleanup split_with_sizes and fix arguments
agelas 2b1c152
Clippy fixes
agelas 01272f1
Finish todos in tensor.rs
agelas 334fa0b
Add documentation to split functions
agelas bd5343f
Small consistency/grammar fixes for chunk
agelas 236b919
Punctuation fix
agelas c5d08ee
Small doc fixes and change to split_with_sizes
agelas 824cb30
Add split functions to float, int, and bool BasicOps impls
agelas 1deee50
Add split functions to int, bool, and quantized tensors
agelas a99a306
Minor doc + code fixes
agelas 9ac5fc0
Add documentation
agelas 3093b5c
Start adding tests
agelas 36a6ff5
Try to get this to compile
agelas 3e790df
Fix docs and add examples
agelas d1624f0
Get initial tests to a working state
agelas d647a9e
Fix doc tests
agelas 54ef092
Add more split tests
agelas 2aedd20
Add more tests for 3D tensor splitting
agelas b3ed77a
Check with full dims so no indexing panic
agelas 1775c1a
Correct flow of check
agelas 7ddab38
Specify which panic to expect in tests
agelas 3d064f8
Add split_with_sizes tests
agelas 9fb3aad
Small fix to chuk tests
agelas dfb571a
Resolve merge conflicts
agelas e98240a
Fix redundant closure
agelas 86f5d31
Fix redunant closure even more
agelas fe8bd67
Resolve merge conflict
agelas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this version of
split
andchunk
? Is it only that split takes the size of the new chunks while chunk takes the number of chunks?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct- and then
split_with_sizes
goes a step further and lets you specify the size of each chunk.