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

[Grouped Matmul] Fix PyTorch memory leak when tensors are not contiguous #290

Merged
merged 5 commits into from
Jan 7, 2024

Conversation

Jokeren
Copy link
Contributor

@Jokeren Jokeren commented Jan 6, 2024

For example, if other[i] was transposed, a new tensor is created in the loop of for (size_t i = 0; i < num_matrices; ++i) {.
The data_ptr of the tensor newly created will be used by a kernel following, but this tensor itself may get released before the kernel launch.

Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (160d5c3) 86.47% compared to head (84b4324) 86.47%.

❗ Current head 84b4324 differs from pull request most recent head 11be60f. Consider uploading reports for the commit 11be60f to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #290   +/-   ##
=======================================
  Coverage   86.47%   86.47%           
=======================================
  Files          35       35           
  Lines        1213     1213           
=======================================
  Hits         1049     1049           
  Misses        164      164           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jokeren
Copy link
Contributor Author

Jokeren commented Jan 6, 2024

@rusty1s

Partial credit goes to my student @Karthikg99 who reported the problem.

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

CHANGELOG.md Outdated Show resolved Hide resolved
@rusty1s rusty1s merged commit 92c99d9 into pyg-team:master Jan 7, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants