-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove getArgsNumAfterSegmentRuns #4122
Conversation
Review updated until commit bc197eb Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
!test |
!test |
!test |
tests/cpp/test_runtime.cpp
Outdated
at::cuda::clearCublasWorkspaces(); | ||
releaseZeroedMemory(); | ||
ASSERT_EQ(memoryAllocated(0), 0) << "Memory leak detected"; |
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.
We can also do this in TearDown of all tests so we can verify none of them leak GPU memory. I'm happy to pursue that in a separate PR because the blast radius is larger.
!test |
!test |
@@ -29,7 +29,8 @@ class Arena { | |||
debug() << "[global zeroed memory] Resetting allocated bytes to 0" | |||
<< std::endl; | |||
} | |||
allocated_bytes_ = 0LL; | |||
allocated_bytes_ = 0; | |||
tensor_.reset(); |
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.
👏
@@ -210,6 +209,8 @@ class CollectiveBasedOverlapTest : public OverlapTest { | |||
params.N}); | |||
return tc_unsharded_expected_reshaped.select(1, my_device_index_); | |||
} | |||
|
|||
at::Tensor tc_locally_reduced_; |
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.
👏
!build |
Instead, check peak memory directly. The utilities will be used for verifying deallocation in host IR.
https://testing.googleblog.com/2013/08/testing-on-toilet-test-behavior-not.html