GitHub

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,5 @@

1+

```{admonition} GPU

2+

:class: warning

3+
4+

This lecture is designed to run on a GPU. To use Google Colab's free GPUs, click the play icon top right, select Colab, and set the runtime to include a GPU. For local GPU setup, see the [JAX installation guide](https://github.com/google/jax).

5+

```

Original file line numberDiff line numberDiff line change

@@ -33,16 +33,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie

3333

!pip install jax quantecon

3434

```

3535
36-

```{admonition} GPU

37-

:class: warning

38-
39-

This lecture is accelerated via [hardware](status:machine-details) that has access to a GPU and targets JAX for GPU programming.

40-
41-

Free GPUs are available on Google Colab.

42-

To use this option, please click on the play icon top right, select Colab, and set the runtime environment to include a GPU.

43-
44-

Alternatively, if you have your own GPU, you can follow the [instructions](https://github.com/google/jax) for installing JAX with GPU support.

45-

If you would like to install JAX running on the `cpu` only you can use `pip install jax[cpu]`

36+

```{include} _admonition/gpu.md

4637

```

4738
4839

## JAX as a NumPy Replacement

Original file line numberDiff line numberDiff line change

@@ -48,16 +48,7 @@ tags: [hide-output]

4848

!pip install quantecon jax

4949

```

5050
51-

```{admonition} GPU

52-

:class: warning

53-
54-

This lecture is accelerated via [hardware](status:machine-details) that has access to a GPU and target JAX for GPU programming.

55-
56-

Free GPUs are available on Google Colab.

57-

To use this option, please click on the play icon top right, select Colab, and set the runtime environment to include a GPU.

58-
59-

Alternatively, if you have your own GPU, you can follow the [instructions](https://github.com/google/jax) for installing JAX with GPU support.

60-

If you would like to install JAX running on the `cpu` only you can use `pip install jax[cpu]`

51+

```{include} _admonition/gpu.md

6152

```

6253
6354

We will use the following imports.

Read the original on github.com ↗