Skip to content

Commit f8efc0f

Browse files
committed
update
1 parent 188a297 commit f8efc0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/tests_pytorch/trainer/test_trainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,7 @@ def on_train_epoch_start(self, trainer, *_):
17501750
def current_memory():
17511751
# before measuring the memory force release any leftover allocations, including CUDA tensors
17521752
gc.collect()
1753+
torch.cuda.empty_cache()
17531754
return torch.cuda.memory_allocated(0)
17541755

17551756
model = TestModel()

0 commit comments

Comments
 (0)