Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bbe1fb1
refine devices
wenhuach21 Jun 1, 2026
1aa5efd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 1, 2026
fc14c01
refine devices
wenhuach21 Jun 2, 2026
705bd30
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 2, 2026
9b19e74
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 2, 2026
a9f4b45
refine devices
wenhuach21 Jun 2, 2026
2e03b7c
refine devices
wenhuach21 Jun 2, 2026
5775f29
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 2, 2026
a4141d3
clean a little
wenhuach21 Jun 3, 2026
4db2409
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2026
2a32290
update
wenhuach21 Jun 3, 2026
5026a90
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 3, 2026
9977980
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2026
d5cd6aa
fix ut
wenhuach21 Jun 3, 2026
182168f
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 3, 2026
181e664
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2026
ab95d3d
fix code scan
wenhuach21 Jun 3, 2026
8882122
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 3, 2026
a0bee00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2026
905df02
fix some issues
wenhuach21 Jun 3, 2026
cc73855
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 3, 2026
78c15bf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2026
20fab69
try to fix ut
wenhuach21 Jun 4, 2026
8db09e4
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 4, 2026
7320efc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
a8d8c85
update
wenhuach21 Jun 4, 2026
20df398
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
632f200
update
wenhuach21 Jun 4, 2026
9affafe
update
wenhuach21 Jun 4, 2026
0aef05b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
ff60860
update
wenhuach21 Jun 4, 2026
8f563c5
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 4, 2026
6efade3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
542cf94
Potential fix for pull request finding
wenhuach21 Jun 4, 2026
919594b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
7dc8fc2
Potential fix for pull request finding
wenhuach21 Jun 4, 2026
07e86ab
Potential fix for pull request finding
wenhuach21 Jun 4, 2026
e351f98
Merge branch 'main' into refine_device_1
wenhuach21 Jun 4, 2026
cf17da9
hot fix for gemma4-12b
wenhuach21 Jun 4, 2026
7c3573d
Merge branch 'refine_device_1' of https://github.com/intel/auto-round…
wenhuach21 Jun 4, 2026
65ef503
update
wenhuach21 Jun 4, 2026
5f227f5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2026
a99fbdf
tiny change
wenhuach21 Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions auto_round/auto_scheme/delta_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
to_dtype,
)
from auto_round.utils.device import MemoryMonitor
from auto_round.utils.device_manager import get_current_device_manager
from auto_round.utils.offload import OffloadManager
from auto_round.wrapper import WrapperLinear

Expand Down Expand Up @@ -441,8 +442,7 @@ def backward_pre_hook(module, grad_input):
"""Hook executed before backward propagation."""
global last_grad_input
last_grad_input = grad_input
if torch.cuda.is_available():
torch.cuda.synchronize()
get_current_device_manager().synchronize()
raise MyCustomError("Interrupt backward pass")

for data in dataloader:
Expand Down Expand Up @@ -599,7 +599,8 @@ def get_score_for_scheme(
with torch.no_grad():
if low_gpu_mem_usage:
device = m.tuning_device if hasattr(m, "tuning_device") else major_device
if "cuda" in device or "xpu" in device:
# Any non-CPU device (cuda/xpu/hpu/...) is consolidated to the major device.
if str(device).split(":")[0] not in ("cpu", "meta", "disk"):
device = major_device
else:
device = m.weight.device
Expand Down
Loading
Loading