From 85ac44593b07b8a92545e02c3b65aff4a26872ec Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Sat, 4 May 2024 07:55:42 -0700 Subject: [PATCH 1/4] Update rewrite_patterns.md --- docs/tutorial/rewriter/rewrite_patterns.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/rewriter/rewrite_patterns.md b/docs/tutorial/rewriter/rewrite_patterns.md index ba58b2636..851e6046f 100644 --- a/docs/tutorial/rewriter/rewrite_patterns.md +++ b/docs/tutorial/rewriter/rewrite_patterns.md @@ -19,9 +19,9 @@ An simple example demonstrating the usage of this functionality using the `GELU` `GELU` activation function can be computed using a Gauss Error Function using the given formula: -
- -
+```{math} +\text{GELU} = x\Phi(x) = x \cdot \frac{1}{2} [1 + \text{erf}(x / \sqrt{2})] +``` We will show how we can find a subgraph matching this computation and replace it by a call to the function. From d2aad310b9d40ff74fa737d29f3e9ce3f4e79f18 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Sat, 4 May 2024 07:59:34 -0700 Subject: [PATCH 2/4] Update rewrite_patterns.md --- docs/tutorial/rewriter/rewrite_patterns.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/rewriter/rewrite_patterns.md b/docs/tutorial/rewriter/rewrite_patterns.md index 851e6046f..3fe06c31a 100644 --- a/docs/tutorial/rewriter/rewrite_patterns.md +++ b/docs/tutorial/rewriter/rewrite_patterns.md @@ -195,4 +195,9 @@ With all the necessary components in place, the pattern rewrite rule with the `m ``` The final graph with the applied rewrite looks as follows: -![broadcast_rewrite](examples/img/broadcast_02.png){align=center} + +```{image} examples/img/broadcast_02.png +:alt: broadcast_rewrite +:width: 100% +:align: center +``` From a0e7dbe4f045013d67dc863958d836da6f75b49a Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Sat, 4 May 2024 08:13:24 -0700 Subject: [PATCH 3/4] Update rewrite_patterns.md --- docs/tutorial/rewriter/rewrite_patterns.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/tutorial/rewriter/rewrite_patterns.md b/docs/tutorial/rewriter/rewrite_patterns.md index 3fe06c31a..60b6a9d51 100644 --- a/docs/tutorial/rewriter/rewrite_patterns.md +++ b/docs/tutorial/rewriter/rewrite_patterns.md @@ -196,8 +196,4 @@ With all the necessary components in place, the pattern rewrite rule with the `m The final graph with the applied rewrite looks as follows: -```{image} examples/img/broadcast_02.png -:alt: broadcast_rewrite -:width: 100% -:align: center -``` +![broadcast_rewrite](examples/img/broadcast_02.png){align=center} From eea8e3926a19c0e9d348ddd9a59be5d1b88a7d6b Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Sat, 4 May 2024 15:16:55 +0000 Subject: [PATCH 4/4] mathjax --- docs/conf.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 319b4044e..d9a53ecf5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,19 +21,18 @@ extensions = [ "myst_parser", - "sphinx.ext.intersphinx", - "sphinx.ext.imgmath", - "sphinx.ext.ifconfig", - "sphinx.ext.viewcode", + "sphinx_copybutton", + "sphinx_gallery.gen_gallery", "sphinx.ext.autodoc", "sphinx.ext.autosummary", + "sphinx.ext.doctest", "sphinx.ext.githubpages", - "sphinx_gallery.gen_gallery", - "sphinx.ext.autodoc", "sphinx.ext.graphviz", - "sphinx.ext.doctest", + "sphinx.ext.ifconfig", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", "sphinx.ext.napoleon", - "sphinx_copybutton", + "sphinx.ext.viewcode", ] myst_enable_extensions = [