From eac1bbe7c65deb47b4458fae3425c7a396416be0 Mon Sep 17 00:00:00 2001 From: mmcky Date: Thu, 13 Apr 2023 09:13:09 +1000 Subject: [PATCH 1/2] ENH: Use file for GPU admonition for single point of reference --- lectures/_notes/gpu.md | 9 +++++++++ lectures/wealth_dynamics.md | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 lectures/_notes/gpu.md diff --git a/lectures/_notes/gpu.md b/lectures/_notes/gpu.md new file mode 100644 index 000000000..a955930a1 --- /dev/null +++ b/lectures/_notes/gpu.md @@ -0,0 +1,9 @@ +```{admonition} GPU +:class: warning + +This lecture is accelerated via [hardware](status:machine-details) that has access to a GPU and JAX for GPU programming. + +Free GPUs are available on Google Colab. To use this option, please click on the play icon top right, select Colab, and set the runtime environment to include a GPU. + +Alternatively, if you have your own GPU, you can follow the [instructions](https://github.com/google/jax) for installing JAX with GPU support. If you would like to install jax running on the `cpu` only you can use `pip install jax[cpu]` +``` \ No newline at end of file diff --git a/lectures/wealth_dynamics.md b/lectures/wealth_dynamics.md index cc65ea062..689e5c5b2 100644 --- a/lectures/wealth_dynamics.md +++ b/lectures/wealth_dynamics.md @@ -19,14 +19,7 @@ kernelspec: # Wealth Distribution Dynamics -```{admonition} GPU -:class: warning - -This lecture is accelerated via [hardware](status:machine-details) that has access to a GPU and JAX for GPU programming. - -Free GPUs are available on Google Colab. To use this option, please click on the play icon top right, select Colab, and set the runtime environment to include a GPU. - -Alternatively, if you have your own GPU, you can follow the [instructions](https://github.com/google/jax) for installing JAX with GPU support. If you would like to install jax running on the `cpu` only you can use `pip install jax[cpu]` +```{include} _notes/gpu.md ``` ```{contents} Contents From cee4a93881536805d1915c3aa29fba6ab125736e Mon Sep 17 00:00:00 2001 From: mmcky Date: Thu, 13 Apr 2023 09:36:06 +1000 Subject: [PATCH 2/2] Update location and populate lecture wide --- lectures/{_notes => _admonitions}/gpu.md | 0 lectures/kesten_processes.md | 9 +-------- lectures/wealth_dynamics.md | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) rename lectures/{_notes => _admonitions}/gpu.md (100%) diff --git a/lectures/_notes/gpu.md b/lectures/_admonitions/gpu.md similarity index 100% rename from lectures/_notes/gpu.md rename to lectures/_admonitions/gpu.md diff --git a/lectures/kesten_processes.md b/lectures/kesten_processes.md index d8e2d7101..5b09cffc1 100644 --- a/lectures/kesten_processes.md +++ b/lectures/kesten_processes.md @@ -19,14 +19,7 @@ kernelspec: # Kesten Processes and Firm Dynamics -```{admonition} GPU -:class: warning - -This lecture is accelerated via [hardware](status:machine-details) that has access to a GPU and JAX for GPU programming. - -Free GPUs are available on Google Colab. To use this option, please click on the play icon top right, select Colab, and set the runtime environment to include a GPU. - -Alternatively, if you have your own GPU, you can follow the [instructions](https://github.com/google/jax) for installing JAX with GPU support. If you would like to install jax running on the `cpu` only you can use `pip install jax[cpu]` +```{include} _admonitions/gpu.md ``` ```{index} single: Linear State Space Models diff --git a/lectures/wealth_dynamics.md b/lectures/wealth_dynamics.md index 689e5c5b2..59ae4bd9d 100644 --- a/lectures/wealth_dynamics.md +++ b/lectures/wealth_dynamics.md @@ -19,7 +19,7 @@ kernelspec: # Wealth Distribution Dynamics -```{include} _notes/gpu.md +```{include} _admonitions/gpu.md ``` ```{contents} Contents