-
Notifications
You must be signed in to change notification settings - Fork 60
fix multiple devices issue in Compressor and AutoScheme #1007
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
Conversation
|
fix #1004 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…o-round into fix_multi_device_issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues related to handling multiple devices by refactoring device parsing logic and memory management. The changes improve device list handling throughout the codebase and ensure proper memory cleanup across multiple GPU devices.
Key changes:
- Renamed
parse_all_available_devicetoparse_available_devicesfor consistency - Enhanced
clear_memoryfunctions to accept adevice_listparameter for multi-device synchronization - Replaced
is_complex_device_mappingchecks withlen(self.device_list) > 1for clearer logic
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| auto_round/utils/device.py | Enhanced device parsing with dict-like string support, refactored memory clearing to handle multiple devices, and renamed device parsing function |
| auto_round/compressors/base.py | Added device_list initialization and propagated it through all clear_memory calls, replaced complex device mapping checks with device list length checks |
| auto_round/auto_scheme/utils.py | Updated import and function call to use renamed parse_available_devices |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…o-round into fix_multi_device_issue
No description provided.