Skip to content

Commit 55635b7

Browse files
committed
Resolve merge conflict: keep include directive for GPU admonition
2 parents 53d48a8 + 594aeac commit 55635b7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lectures/jax_intro.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ kernelspec:
1515

1616
This lecture provides a short introduction to [Google JAX](https://github.com/jax-ml/jax).
1717

18-
JAX is a high-performance scientific computing library that provides
18+
JAX is a high-performance scientific computing library that provides
1919

20-
* a NumPy-like interface that can automatically parallize across CPUs and GPUs,
20+
* a [NumPy](https://en.wikipedia.org/wiki/NumPy)-like interface that can automatically parallelize across CPUs and GPUs,
2121
* a just-in-time compiler for accelerating a large range of numerical
2222
operations, and
23-
* automatic differentiation.
23+
* [automatic differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation).
2424

25-
Increasingly, JAX also maintains and provides more specialized scientific
26-
computing routines, such as those originally found in SciPy.
25+
Increasingly, JAX also maintains and provides [more specialized scientific
26+
computing routines](https://docs.jax.dev/en/latest/jax.scipy.html), such as those originally found in [SciPy](https://en.wikipedia.org/wiki/SciPy).
2727

2828
In addition to what's in Anaconda, this lecture will need the following libraries:
2929

@@ -41,7 +41,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
4141
One of the attractive features of JAX is that, whenever possible, its array
4242
processing operations conform to the NumPy API.
4343

44-
This means that, in many cases, we can use JAX is as a drop-in NumPy replacement.
44+
This means that, in many cases, we can use JAX as a drop-in NumPy replacement.
4545

4646
Let's look at the similarities and differences between JAX and NumPy.
4747

@@ -190,7 +190,7 @@ a, a_new
190190
```
191191

192192
The designers of JAX chose to make arrays immutable because JAX uses a
193-
*functional programming style*.
193+
[functional programming](https://en.wikipedia.org/wiki/Functional_programming) style.
194194

195195
This design choice has important implications, which we explore next!
196196

@@ -232,19 +232,19 @@ In other words, JAX assumes a functional programming style.
232232

233233
The major implication is that JAX functions should be pure.
234234

235-
**Pure functions** have the following characteristics:
235+
[Pure functions](https://en.wikipedia.org/wiki/Pure_function) have the following characteristics:
236236

237237
1. *Deterministic*
238238
2. *No side effects*
239239

240-
**Deterministic** means
240+
[Deterministic](https://en.wikipedia.org/wiki/Deterministic_algorithm) means
241241

242242
* Same input $\implies$ same output
243243
* Outputs do not depend on global state
244244

245245
In particular, pure functions will always return the same result if invoked with the same inputs.
246246

247-
**No side effects** means that the function
247+
[No side effects](https://en.wikipedia.org/wiki/Side_effect_(computer_science)) means that the function
248248

249249
* Won't change global state
250250
* Won't modify data passed to the function (immutable data)
@@ -298,7 +298,7 @@ At first you might find the syntax rather verbose.
298298
But you will soon realize that the syntax and semantics are necessary in order
299299
to maintain the functional programming style we just discussed.
300300

301-
Moreover, full control of random state
301+
Moreover, full control of random state is
302302
essential for parallel programming, such as when we want to run independent experiments along multiple threads.
303303

304304

@@ -784,8 +784,8 @@ We defer further exploration of automatic differentiation with JAX until {doc}`j
784784
:label: jax_intro_ex2
785785
```
786786

787-
In the Exercise section of {doc}`our lecture on Numba <numba>`, we used Monte
788-
Carlo to price a European call option.
787+
In the Exercise section of {doc}`our lecture on Numba <numba>`, we {ref}`used Monte
788+
Carlo to price a European call option <numba_ex4>`.
789789

790790
The code was accelerated by Numba-based multithreading.
791791

0 commit comments

Comments
 (0)