Skip to content

Commit

Permalink
TST: test timing of jax
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Mar 22, 2024
1 parent 1a1be32 commit 437c7db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lectures/jax_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ f_jit(x)
And now let's time it.

```{code-cell} ipython3
%time f_jit(x).block_until_ready()
%time x_jax = jax.device_put(x)
```

```{code-cell} ipython3
%timeit f_jit(x_jax).block_until_ready()
```

Note the speed gain.
Expand Down

0 comments on commit 437c7db

Please sign in to comment.