Skip to content

Commit 8b2ec64

Browse files
author
Vincent Moens
committed
amend
1 parent 3ad73ad commit 8b2ec64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

intermediate_source/pinmem_nonblock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ def timer(cmd):
192192
bar_labels = [
193193
"pageable_tensor.to(device) (1x)",
194194
f"pinned_tensor.to(device) ({r1:4.2f}x)",
195-
f"pageable_tensor.pin_memory().to(device) ({r2:4.2f}x)",
195+
f"pageable_tensor.pin_memory().to(device) ({r2:4.2f}x)"
196+
f"\npin_memory()={100*pin_mem/pin_mem_to_device:.2f}\% of runtime.",
196197
]
197198
values = [pageable_to_device, pinned_to_device, pin_mem_to_device]
198199
colors = ["tab:blue", "tab:red", "tab:orange"]

0 commit comments

Comments
 (0)