Skip to content

Commit 98f6e12

Browse files
committed
add device_id for non meta models
1 parent 07428c4 commit 98f6e12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

composer/trainer/dist_strategy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ def _auto_wrap_policy(module: torch.nn.Module, recurse: bool, unwrapped_params:
238238
mixed_precision=mixed_precision,
239239
backward_prefetch=backward_prefetch,
240240
param_init_fn=_param_init_fn,
241+
device_id=torch.cuda.current_device(),
241242
)
242243

243244
# Activation Checkpointing

0 commit comments

Comments
 (0)