-
Notifications
You must be signed in to change notification settings - Fork 352
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
Adding remove_caches API to Float8Tensor class #1425
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Youngeun Kwon <[email protected]>
/te-ci pytorch L1 |
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.
Seems reasonable, although I'd like to wait until after the 2.0 release to merge.
@@ -919,6 +919,14 @@ def _reset_caches(self) -> None: | |||
""" | |||
self._transpose_invalid = True | |||
|
|||
def remove_caches(self) -> None: |
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.
Nit: I'd prefer if we treated this as an internal function and not a public API that can be relied on.
def remove_caches(self) -> None: | |
def _remove_caches(self) -> None: |
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.
Hi @timmoon10, ADLR asked for a public API that is able to remove the transpose cache, which is the reason I am working on this PR. I guess it will be better to have public API to meet their request if you are also okay with that.
Co-authored-by: Tim Moon <[email protected]> Signed-off-by: Youngeun Kwon <[email protected]>
Thank you for the review! I will wait for the 2.0 release to be merged. Can I know a rough ETA of that? |
Description
Add remove_caches API for Float8Tensor.
This API frees the allocated memory for the transpose cache.
This API is required for FSDP use cases.
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: