Skip to content

Conversation

Borda
Copy link
Member

@Borda Borda commented Aug 18, 2025

What does this PR do?

reverting #21057 even on the PR all CI was green

addressing:

FAILED strategies/launchers/test_multiprocessing_integration.py::test_memory_sharing_disabled[ddp_fork] - torch.multiprocessing.spawn.ProcessRaisedException: 

-- Process 1 terminated with the following error:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/torch/multiprocessing/spawn.py", line 90, in _wrap
    fn(i, *args)
  File "/home/runner/work/pytorch-lightning/pytorch-lightning/src/lightning_fabric/strategies/launchers/multiprocessing.py", line 142, in _wrapping_function
    results = function(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/pytorch-lightning/pytorch-lightning/src/lightning_fabric/fabric.py", line 934, in _wrap_with_setup
    return to_run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/pytorch-lightning/pytorch-lightning/tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py", line 57, in _test_memory_sharing_disabled
    fabric.barrier()
  File "/home/runner/work/pytorch-lightning/pytorch-lightning/src/lightning_fabric/fabric.py", line 547, in barrier
    self._strategy.barrier(name=name)
  File "/home/runner/work/pytorch-lightning/pytorch-lightning/src/lightning_fabric/strategies/ddp.py", line 162, in barrier
    torch.distributed.barrier()
  File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/torch/distributed/c10d_logger.py", line 81, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/torch/distributed/distributed_c10d.py", line 4792, in barrier
    device = torch._C._get_accelerator()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--21092.org.readthedocs.build/en/21092/

@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Aug 18, 2025
Copy link
Contributor

github-actions bot commented Aug 18, 2025

⚡ Required checks status: All passing 🟢

Groups summary

🟢 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu-guardian success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) (testing Lightning | latest) success
pytorch-lightning (GPUs) (testing PyTorch | oldest) success
pytorch-lightning (GPUs) (testing PyTorch | latest) success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.

🟢 pytorch_lightning: Benchmarks
Check ID Status
lightning.Benchmarks success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.

🟢 fabric: Docs
Check ID Status
docs-make (fabric, doctest) success
docs-make (fabric, html) success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.

🟢 lightning_fabric: CPU workflow
Check ID Status
fabric-cpu-guardian success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py, tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py, tests/tests_fabric/utilities/test_distributed.py.

🟢 lightning_fabric: Azure GPU
Check ID Status
lightning-fabric (GPUs) (testing Fabric | oldest) success
lightning-fabric (GPUs) (testing Fabric | latest) success
lightning-fabric (GPUs) (testing Lightning | latest) success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py, tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py, tests/tests_fabric/utilities/test_distributed.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.

🟢 install
Check ID Status
install-pkg-guardian success

These checks are required after the changes to src/lightning/fabric/plugins/collectives/torch_collective.py, src/lightning/fabric/utilities/distributed.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87%. Comparing base (8d1a734) to head (3688da5).
⚠️ Report is 9 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21092   +/-   ##
=======================================
- Coverage      87%      87%   -0%     
=======================================
  Files         269      269           
  Lines       23507    23501    -6     
=======================================
- Hits        20495    20487    -8     
- Misses       3012     3014    +2     

@Borda Borda changed the title debug failing tests for Fabric with ddp_fork on PT 2.8 debug failing tests for Fabric with ddp_fork on PT 2.8 -> revert #21057 Aug 18, 2025
@Borda Borda requested a review from justusschock August 18, 2025 10:11
@Borda Borda merged commit 9ca360b into master Aug 18, 2025
114 of 115 checks passed
@Borda Borda deleted the debug/ddp_fork branch August 18, 2025 11:00
Borda added a commit that referenced this pull request Aug 28, 2025
…1057 (#21092)

* debug failing tests for Fabric with `ddp_fork` on PT 2.8

* Revert "let  `_get_default_process_group_backend_for_device` support more hardware platforms (#21057)"

This reverts commit 119a640.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 9ca360b)
lantiga pushed a commit that referenced this pull request Aug 29, 2025
…1057 (#21092)

* debug failing tests for Fabric with `ddp_fork` on PT 2.8

* Revert "let  `_get_default_process_group_backend_for_device` support more hardware platforms (#21057)"

This reverts commit 119a640.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 9ca360b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fabric lightning.fabric.Fabric
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants