Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion auto_round/compressors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ def _quantize_layer_via_rtn(self, name: str) -> None:
m.zp = None
else:
try:
m = m.to(self.device)
m = m.to(m.tuning_device if hasattr(m, "tuning_device") else self.device)
m = WrapperLinear(
m,
enable_minmax_tuning=False,
Expand Down
13 changes: 13 additions & 0 deletions test/test_cuda/test_multiple_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,19 @@ def test_device_map_dict(self):
)
autoround.quantize()

# test rtn
autoround = AutoRound(
model_name,
tokenizer,
bits=bits,
group_size=group_size,
sym=sym,
iters=0,
seqlen=2,
device_map=device_map,
)
autoround.quantize()

@multi_card
@require_greater_than_050
def test_device_map_for_triton(self):
Expand Down