-
Notifications
You must be signed in to change notification settings - Fork 687
Metal backend: Add AOTI shims for memory management #15021
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
base: gh/manuelcandales/140/head
Are you sure you want to change the base?
Metal backend: Add AOTI shims for memory management #15021
Conversation
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15021
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit cf93ffd with merge base 6e0c9f6 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ET_LOG( | ||
Debug, | ||
"aoti_torch_delete_tensor_object: successfull (Metal GPU memory)"); | ||
return Error::Ok; |
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.
returning early causes memory leak, no?
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.
Maybe explicitly implement metal_free_buffer to properly clean up metal buffers and call the method whenever appropriate
Implement the following shims: - aoti_torch_create_tensor_from_blob_v2 - aoti_torch_empty_strided - aoti_torch_delete_tensor_object - aoti_torch_copy_ - aoti_torch__reinterpret_tensor ghstack-source-id: e272dc3 ghstack-comment-id: 3392300212 Pull-Request: pytorch#15021
Implement the following shims: