Skip to content

Commit 770ffbc

Browse files
committed
comply
1 parent f9b012f commit 770ffbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intermediate_source/optimizer_step_in_backward_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def train(model, optimizer):
7272
# the CUDA memory timeline to look like.
7373

7474
# tell CUDA to start recording memory allocations
75-
torch.cuda.memory._record_memory_history()
75+
torch.cuda.memory._record_memory_history(enabled='all')
7676

7777
# train 3 steps
7878
for _ in range(3):
@@ -209,7 +209,7 @@ def train(model):
209209
del optimizer
210210

211211
# tell CUDA to start recording memory allocations
212-
torch.cuda.memory._record_memory_history()
212+
torch.cuda.memory._record_memory_history(enabled='all')
213213

214214
# train 3 steps. note that we no longer pass the optimizer into train()
215215
for _ in range(3):

0 commit comments

Comments
 (0)