fix RMATest failure and reduce testing cost (#2002)#2002
Open
tianfengfrank wants to merge 2 commits intomainfrom
Open
fix RMATest failure and reduce testing cost (#2002)#2002tianfengfrank wants to merge 2 commits intomainfrom
tianfengfrank wants to merge 2 commits intomainfrom
Conversation
Contributor
|
@tianfengfrank has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100051366. |
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Summary: The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one. How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms. Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM. The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly. NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm. Reviewed By: dolpm Differential Revision: D100051366
45db8d4 to
ea9ee5d
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Summary: The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one. How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms. Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM. The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly. NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm. Reviewed By: dolpm Differential Revision: D100051366
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Summary: The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one. How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms. Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM. The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly. NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm. Reviewed By: dolpm Differential Revision: D100051366
tianfengfrank
pushed a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 8, 2026
Summary: Pull Request resolved: meta-pytorch#2002 Differential Revision: D100051366
Summary: We need to align AGP's internal persistent request with the window API so that regular AllGather can be converted to AGP in graph capture mode (window init + dry-run exec at capture time, SM-free CE replay at execution time). In this diff, we extract `initResources` to a public func so that window AGP can directly call it Reviewed By: dsjohns2 Differential Revision: D99514784
Summary: The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one. How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms. Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM. The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly. NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm. Reviewed By: dolpm Differential Revision: D100051366
ea9ee5d to
43cabb0
Compare
tianfengfrank
pushed a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2002 Differential Revision: D100051366
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2002 - the ncclx test are migrated to meta/test but RMATest has been left - this diff migrate RMATest to meta/tests shared by all ncclx version - also simplified the UT to save resources since we have similar test at Ctran level as well, e.g: - reduce kNumIters from 500 to 10 - remove winAlloc test since winRegister would be the only entry later - consolidate Put/PutSignal test case Reviewed By: MogicianWu, dolpm Differential Revision: D100051366
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2017 Pull Request resolved: meta-pytorch#2002 - the ncclx test are migrated to meta/test but RMATest has been left - this diff migrate RMATest to meta/tests shared by all ncclx version - also simplified the UT to save resources since we have similar test at Ctran level as well, e.g: - reduce kNumIters from 500 to 10 - remove winAlloc test since winRegister would be the only entry later - consolidate Put/PutSignal test case Reviewed By: MogicianWu, dolpm Differential Revision: D100051366
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2017 Pull Request resolved: meta-pytorch#2002 - the ncclx test are migrated to meta/test but RMATest has been left - this diff migrate RMATest to meta/tests shared by all ncclx version - also simplified the UT to save resources since we have similar test at Ctran level as well, e.g: - reduce kNumIters from 500 to 10 - remove winAlloc test since winRegister would be the only entry later - consolidate Put/PutSignal test case Reviewed By: MogicianWu, dolpm Differential Revision: D100051366
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2017 Pull Request resolved: meta-pytorch#2002 - the ncclx test are migrated to meta/test but RMATest has been left - this diff migrate RMATest to meta/tests shared by all ncclx version - also simplified the UT to save resources since we have similar test at Ctran level as well, e.g: - reduce kNumIters from 500 to 10 - remove winAlloc test since winRegister would be the only entry later - consolidate Put/PutSignal test case Reviewed By: MogicianWu, dolpm Differential Revision: D100051366
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2017 Pull Request resolved: meta-pytorch#2002 - the ncclx test are migrated to meta/test but RMATest has been left - this diff migrate RMATest to meta/tests shared by all ncclx version - also simplified the UT to save resources since we have similar test at Ctran level as well, e.g: - reduce kNumIters from 500 to 10 - remove winAlloc test since winRegister would be the only entry later - consolidate Put/PutSignal test case Reviewed By: MogicianWu, dolpm Differential Revision: D100051366
tianfengfrank
pushed a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2002 Differential Revision: D100051366
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one.
How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms.
Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM.
The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly.
NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm.
Reviewed By: dolpm
Differential Revision: D100051366