Skip to content

Commit ea53204

Browse files
author
Vincent Moens
committed
amend
1 parent 4fe4bde commit ea53204

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intermediate_source/pinmem_nonblock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ def timer(cmd):
288288

289289

290290
# A tensor in pageable memory
291-
pageable_tensor = torch.randn(1000)
291+
pageable_tensor = torch.randn(1_000_000)
292292

293293
# A tensor in page-locked (pinned) memory
294-
pinned_tensor = torch.randn(1000, pin_memory=True)
294+
pinned_tensor = torch.randn(1_000_000, pin_memory=True)
295295

296296
# Runtimes:
297297
pageable_to_device = timer("pageable_tensor.to('cuda:0')")

0 commit comments

Comments
 (0)