Skip to content

Conversation

@wenhuach21
Copy link
Contributor

No description provided.

@wenhuach21
Copy link
Contributor Author

fix #1004

Copy link
Contributor

Copilot AI left a 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_device to parse_available_devices for consistency
  • Enhanced clear_memory functions to accept a device_list parameter for multi-device synchronization
  • Replaced is_complex_device_mapping checks with len(self.device_list) > 1 for 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.

wenhuach21 and others added 3 commits November 7, 2025 18:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a 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.

@wenhuach21 wenhuach21 requested a review from Copilot November 7, 2025 10:54
Copy link
Contributor

Copilot AI left a 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.

wenhuach21 and others added 4 commits November 7, 2025 18:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@wenhuach21 wenhuach21 changed the title fix multiple device issue fix multiple devices issue in Compressor and AutoScheme Nov 7, 2025
@wenhuach21 wenhuach21 merged commit 344b40c into main Nov 8, 2025
23 checks passed
@wenhuach21 wenhuach21 deleted the fix_multi_device_issue branch November 8, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants