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) add device access method #692

Merged
merged 3 commits into from
Apr 11, 2023

Conversation

ccaven
Copy link
Contributor

@ccaven ccaven commented Apr 11, 2023

Returns a reference to the tensor's DeviceStorage

Motivation: create new tensors in forward pass

Example:

fn try_forward(&self, input: ...) {
    let new_tensor: Tensor<Rank2<10, 5>, E, D> = input.device().zeros();
    ....
}

Returns a reference to the tensor's DeviceStorage
@coreylowman coreylowman merged commit 7e359e4 into coreylowman:main Apr 11, 2023
@ccaven ccaven deleted the add-device-access branch April 11, 2023 16:12
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