Skip to content
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

Fix module to device in AutoUnit #398

Closed
wants to merge 2 commits into from

Conversation

daniellepintz
Copy link
Contributor

Summary:
In D46001765 the self.device reference was accidentally changed to device. Because of this the module isn't being moved to the device properly and we are seeing errors like:

ValueError: DistributedDataParallel device_ids and output_device arguments only work with single-device/multiple-device GPU modules or CPU modules, but got device_ids [1], output_device None, and module parameters {device(type='cpu')}

when running vise DDP.

Differential Revision: D46056924

daniellepintz and others added 2 commits May 21, 2023 10:13
fbshipit-source-id: d6e1566f82fb798d486f79fb2d72acbcc2881b8a
Summary:
In D46001765 the `self.device` reference was accidentally changed to `device`. Because of this the module isn't being moved to the device properly and we are seeing errors like:
```
ValueError: DistributedDataParallel device_ids and output_device arguments only work with single-device/multiple-device GPU modules or CPU modules, but got device_ids [1], output_device None, and module parameters {device(type='cpu')}
```
when running vise DDP.

Differential Revision: D46056924

fbshipit-source-id: ce22d1efb542b57b951430f0c75d6b075b0e956e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46056924

@codecov
Copy link

codecov bot commented May 21, 2023

Codecov Report

Merging #398 (b3fb522) into master (60331d0) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
- Coverage   86.79%   86.78%   -0.02%     
==========================================
  Files          92       92              
  Lines        6734     6736       +2     
==========================================
+ Hits         5845     5846       +1     
- Misses        889      890       +1     
Impacted Files Coverage Δ
torchtnt/utils/__init__.py 100.00% <ø> (ø)
torchtnt/utils/device.py 55.37% <66.66%> (-0.10%) ⬇️
torchtnt/framework/auto_unit.py 81.18% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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

Successfully merging this pull request may close these issues.

2 participants