Skip to content

Conversation

@GdoongMathew
Copy link
Contributor

@GdoongMathew GdoongMathew commented Aug 24, 2025

What does this PR do?

Fixes #17355

  • 1 GPU
GPU available: NVIDIA GeForce RTX 3050 4GB Laptop GPU, using: 1 devices.
TPU available: False, using: 0 TPU cores
HPU available: False, using: 0 HPUs
  • 2 GPUs (Kaggle)
>>> t = Trainer(devices=2)
INFO: GPU available: Tesla T4, using: 2 devices.
INFO: TPU available: False, using: 0 TPU cores
INFO: HPU available: False, using: 0 HPUs
  • No cuda GPU available
GPU available: False, using: 0 devices.
TPU available: False, using: 0 TPU cores
HPU available: False, using: 0 HPUs
  • MPS
GPU available: Apple M1 Pro, using: 1 devices.
TPU available: False, using: 0 TPU cores
HPU available: False, using: 0 HPUs
  • XLA (Kaggle)
GPU available: False, using: 0 devices.
TPU available: v3-8, using: 8 TPU cores
HPU available: False, using: 0 HPUs
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--21112.org.readthedocs.build/en/21112/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Aug 24, 2025
@GdoongMathew GdoongMathew changed the title [WIP] Add device_name classmethod in Accelerator. Add device_name classmethod in Accelerator. Aug 26, 2025
@GdoongMathew

This comment was marked as off-topic.

@GdoongMathew
Copy link
Contributor Author

GdoongMathew commented Aug 27, 2025

Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

How would you handle heterogeneous gpu types? E.g. say I have one 3090 and one 4090 in my workstation. This doesn't handle it at all.

@GdoongMathew
Copy link
Contributor Author

How would you handle heterogeneous gpu types? E.g. say I have one 3090 and one 4090 in my workstation. This doesn't handle it at all.

Hi @justusschock , based on the change, the output should look something like

GPU available: RTX 3090, RTX 4090, using: 2 devices.

that being said, if the setup is more complex - for example 2 x 3090 and 1 x 4090 - the current output might not fully reflect that.

@GdoongMathew

This comment has been minimized.

@GdoongMathew GdoongMathew marked this pull request as draft August 28, 2025 12:47
@GdoongMathew
Copy link
Contributor Author

Hi @Borda , a friendly ping for a review ~

@Borda
Copy link
Collaborator

Borda commented Oct 22, 2025

Hi @Borda , a friendly ping for a review ~

unfortunatly, I am not in a position to approve a feature type PR, lest ping @ethanwharris

# Conflicts:
#	src/lightning/pytorch/accelerators/xla.py
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 74.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 79%. Comparing base (8ac4843) to head (6f185e5).
✅ All tests successful. No failed tests found.

❗ There is a different number of reports uploaded between BASE (8ac4843) and HEAD (6f185e5). Click for more details.

HEAD has 390 uploads less than BASE
Flag BASE (8ac4843) HEAD (6f185e5)
python3.10 12 3
cpu 120 30
lightning 60 15
pytest 60 0
lightning_fabric 30 0
python3.12 36 9
python3.11 24 6
python3.12.7 36 9
python 12 3
pytorch_lightning 30 15
pytorch2.6 6 3
pytest-full 60 30
pytorch2.5.1 6 3
pytorch2.7 6 3
pytorch2.9 6 3
pytorch2.2.2 6 3
pytorch2.1 12 6
pytorch2.8 6 3
pytorch2.3 6 3
pytorch2.4.1 6 3
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #21112     +/-   ##
=========================================
- Coverage      87%      79%     -8%     
=========================================
  Files         269      266      -3     
  Lines       23799    23783     -16     
=========================================
- Hits        20618    18745   -1873     
- Misses       3181     5038   +1857     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accelerator pl Generic label for PyTorch Lightning package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add device information to the accelerator config message

4 participants