Skip to content

Commit 06febf1

Browse files
committed
f
1 parent 48ba5ed commit 06febf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lightning/fabric/strategies/deepspeed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def load_checkpoint(
506506

507507
optimzer_state_requested = any(isinstance(item, (Optimizer, DeepSpeedOptimizer)) for item in state.values())
508508

509-
if isinstance(self.accelerator, Accelerator) and self.accelerator.get_device() != "cpu": # type: ignore[union-attr]
509+
if isinstance(self.accelerator, Accelerator) and self.accelerator.get_device() != "cpu":
510510
getattr(torch, self.root_device.type.split(':')[0]).empty_cache()
511511
else:
512512
torch.cuda.empty_cache()

0 commit comments

Comments
 (0)