Skip to content

Commit 1026a4a

Browse files
committed
Remove spurious device extraction
Signed-off-by: Andrea Fasoli <[email protected]>
1 parent fcd357c commit 1026a4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fms_mo/quant/ptq.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,6 @@ def get_act_scales(
24042404
)
24052405
model.to(device)
24062406

2407-
dev = next(model.parameters()).device
24082407
act_scales = {}
24092408
qcfg["sample_id"] = 0
24102409
hooks = []
@@ -2421,7 +2420,7 @@ def get_act_scales(
24212420

24222421
for data_mb, _ in zip(pbar, range(n_samples)):
24232422
qcfg["sample_id"] += 1
2424-
data_mb = move_to(data_mb, dev)
2423+
data_mb = move_to(data_mb, device)
24252424
if (
24262425
qcfg["nbits_bmm1"] < 32
24272426
or qcfg["nbits_bmm2"] < 32

0 commit comments

Comments
 (0)