Skip to content

Commit fff53ba

Browse files
authored
Update finetune.py
Signed-off-by: Mamta Singh <[email protected]>
1 parent 9c3a460 commit fff53ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QEfficient/cloud/finetune.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def setup_distributed_training(train_config: TrainConfig) -> None:
9696

9797
dist.init_process_group(backend=train_config.dist_backend)
9898
if train_config.enable_pp:
99-
assert dist.get_world_size() % train_config.num_pp_stages == 0, (
100-
"total available devices should be multiple of number of pipeline stages"
99+
assert dist.get_world_size() * train_config.num_pp_stages == getattr(torch, torch_device.type).device_count(), (
100+
"Total available devices should be multiple of number of pipeline stages."
101101
)
102102
else:
103103
# from here onward "qaic/cuda" will automatically map to "qaic:i/cuda:i", where i = process rank

0 commit comments

Comments
 (0)