-
Notifications
You must be signed in to change notification settings - Fork 490
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
Add chunk
Tensor Method
#970
Comments
I would like to work on this issue, can you assign it to me? |
Nice! Let me know if you need any guidance. You can also find me in the Discord as |
Done |
I just had a brief look at the source code, the file I should modify is
|
Correct! I think interface can likely be the following, if you do the chunking in base space: pub fn chunk(self, chunks: usize, dim: usize) -> Vec<Self> Although given that some of the backends already have their own implementations, it might be better to do this backend specific instead of general (depends on what optimizations they have). What do you say @nathanielsimard ? |
I think leveraging the implementation of the backend is a good idea! |
@dcvz can this issue be closed as the main PR is merged? |
I'm working on the backend implementation, we can use this issue or open another issue as a tracker. |
Feature description
Add a
chunk
method on tensor to faciliate splitting a tensor into a given number of chunksFeature motivation
Its a fairly common operation supported by other ML frameworks.
Actions
The text was updated successfully, but these errors were encountered: