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

Reuse allocations during inference forward #671

Closed
coreylowman opened this issue Apr 7, 2023 · 0 comments · Fixed by #673
Closed

Reuse allocations during inference forward #671

coreylowman opened this issue Apr 7, 2023 · 0 comments · Fixed by #673

Comments

@coreylowman
Copy link
Owner

Recent changes #664 have added in place kernel methods to a bunch of kernel operations, that attempt to reuse the input's allocation if possible. The changes were mainly aimed at training, but there is an additional optimization we can add for inference. We can check if the tape is tracing T::OWNS_TAPE, and if so, try to reuse the memory.

coreylowman added a commit that referenced this issue Apr 7, 2023
* #671 reusing allocations during inference

* Speeding up batchnorm2d inference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant