Skip to content

Commit 9b3407f

Browse files
committed
Memory Spaces - Power Iteration: Fix %timeit synchronization.
1 parent d69a3b4 commit 9b3407f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

notebooks/5__memory_spaces__power_iteration.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@
315315
"print(f\"Execution Time\")\n",
316316
"print()\n",
317317
"\n",
318-
"time_host = %timeit -q -o estimate_host(A_host, PowerIterationConfig(progress=False))\n",
318+
"time_host = %timeit -q -o estimate_host(A_host, PowerIterationConfig(progress=False)).item()\n",
319319
"print(f\"Power iteration (host) = {time_host}\")\n",
320320
"\n",
321-
"time_device = %timeit -q -o estimate_device(A_host, PowerIterationConfig(progress=False))\n",
321+
"time_device = %timeit -q -o estimate_device(A_host, PowerIterationConfig(progress=False)).item()\n",
322322
"print(f\"Power iteration (device) = {time_device}\")\n",
323323
"\n",
324324
"time_ref = %timeit -q -o -r 1 -n 1 np.linalg.eigvals(A_host).real.max()\n",
@@ -340,4 +340,4 @@
340340
}
341341
}
342342
]
343-
}
343+
}

0 commit comments

Comments
 (0)