Skip to content

🐛 Fix Multi-GPU Support with torch.compile #923

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

adamshephard
Copy link
Contributor

@adamshephard adamshephard commented Apr 16, 2025

Change multi-GPU mode from DataParallel to DataDistributedParallel to work with torch.compile. However, this essentially limits the task to using one GPU alone when using torch.compile. It is not a trivial solution to change this to use multiple GPUs that also work with torch.compile. We will release a future fix to fully correct this with the new engine.

Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 99.64%. Comparing base (bae6c2e) to head (b271f3e).

Files with missing lines Patch % Lines
tiatoolbox/models/models_abc.py 50.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #923      +/-   ##
===========================================
- Coverage    99.70%   99.64%   -0.06%     
===========================================
  Files           71       71              
  Lines         8848     8855       +7     
  Branches      1154     1154              
===========================================
+ Hits          8822     8824       +2     
- Misses          23       27       +4     
- Partials         3        4       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shaneahmed shaneahmed added bug Something isn't working enhancement New feature or request labels Apr 25, 2025
@shaneahmed shaneahmed added this to the Release v1.7.0 milestone Apr 25, 2025
@shaneahmed shaneahmed changed the title FIX: Update for multi-GPU support with torch.compile 🐛 Fix Multi-GPU Support with torch.compile Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

torch.compile issue when computing features on multiple GPUs (nn.DataParallel)
2 participants