Skip to content

Commit a976740

Browse files
[docs] Getting started refactor (#2534)
* docs: Add comprehensive Getting Started guide with benchmarks - Add new Getting Started documentation with PyTorch and JAX tutorials - Include benchmark scripts demonstrating TE performance benefits - Add CSS styling for code output and tabs - Replace old quickstart notebooks with improved documentation - Add transformer layer diagram (SVG) - Update docs configuration and workflow Signed-off-by: Pawel Gadzinski <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix Signed-off-by: Pawel Gadzinski <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix Signed-off-by: Pawel Gadzinski <[email protected]> * 2026 in copyright Signed-off-by: Pawel Gadzinski <[email protected]> --------- Signed-off-by: Pawel Gadzinski <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c90a921 commit a976740

21 files changed

+2068
-1463
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v3
1818
- name: 'Install dependencies'
1919
run: |
20-
pip install sphinx==8.1.3 sphinx_rtd_theme==3.0.1 nbsphinx==0.9.5 IPython ipython_genutils==0.2.0 ipywidgets==8.0.2 astroid==3.3.2
20+
pip install sphinx==8.1.3 sphinx_rtd_theme==3.0.1 nbsphinx==0.9.5 IPython ipython_genutils==0.2.0 ipywidgets==8.0.2 astroid==3.3.2 sphinx-tabs==3.4.7
2121
pip install breathe==4.35.0 sphinx-autoapi==3.3.2
2222
sudo apt-get install -y pandoc graphviz doxygen
2323
export GIT_SHA=$(git show-ref --hash HEAD)

docs/_static/css/output-style.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/* Custom styling for program output blocks */
2+
3+
.program-output {
4+
background-color: #f8f9fa;
5+
padding: 0; /* No padding at all */
6+
margin: 0; /* No margins at all */
7+
border-radius: 0; /* No rounded corners */
8+
font-family: 'Courier New', monospace;
9+
font-size: 14px;
10+
line-height: 1.5;
11+
width: 100%;
12+
max-width: 100%;
13+
}
14+
15+
.program-output pre {
16+
margin: 0;
17+
padding: 0;
18+
background: transparent !important;
19+
border: none !important;
20+
color: #2c3e50;
21+
width: 100%;
22+
}
23+
24+
.program-output .highlight {
25+
background: transparent !important;
26+
margin: 0;
27+
width: 100%;
28+
}
29+
30+
/* Alternative lighter style */
31+
.output-block {
32+
background-color: #fafbfc;
33+
border: 1px solid #e1e4e8;
34+
padding: 10px 14px;
35+
margin: 10px 0;
36+
border-radius: 3px;
37+
font-family: 'SF Mono', 'Consolas', monospace;
38+
font-size: 13px;
39+
color: #24292e;
40+
}
41+
42+
/* Console-like output style */
43+
.console-output {
44+
background-color: #1e1e1e;
45+
border-left: 3px solid #76b900;
46+
padding: 14px 18px;
47+
margin: 12px 0;
48+
border-radius: 5px;
49+
font-family: 'Fira Code', 'Consolas', monospace;
50+
font-size: 13px;
51+
color: #d4d4d4;
52+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
53+
}
54+
55+
.console-output pre {
56+
margin: 0;
57+
color: #d4d4d4;
58+
background: transparent !important;
59+
}
60+

docs/_static/css/rtabs.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Custom styling for sphinx-tabs */
2+
3+
.sphinx-tabs {
4+
margin-bottom: 1rem;
5+
}
6+
7+
.sphinx-tabs-tab {
8+
background-color: #f4f4f4;
9+
border: 1px solid #ccc;
10+
border-bottom: none;
11+
padding: 0.5rem 1rem;
12+
margin-right: 0.5rem;
13+
cursor: pointer;
14+
font-weight: 500;
15+
transition: background-color 0.2s;
16+
}
17+
18+
.sphinx-tabs-tab:hover {
19+
background-color: #e0e0e0;
20+
}
21+
22+
.sphinx-tabs-tab[aria-selected="true"] {
23+
background-color: #76b900; /* NVIDIA green */
24+
color: white;
25+
border-color: #76b900;
26+
margin-right: 0.5rem;
27+
}
28+
29+
.sphinx-tabs-panel {
30+
border: 1px solid #ccc;
31+
padding: 1rem;
32+
background-color: #f9f9f9;
33+
}
34+
35+
/* Dark mode support for RTD theme */
36+
.rst-content .sphinx-tabs-tab {
37+
color: #333;
38+
}
39+
40+
.rst-content .sphinx-tabs-tab[aria-selected="true"] {
41+
color: white;
42+
}
43+

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"nbsphinx",
5959
"breathe",
6060
"autoapi.extension",
61+
"sphinx_tabs.tabs",
6162
]
6263

6364
templates_path = ["_templates"]
@@ -83,6 +84,8 @@
8384
html_css_files = [
8485
"css/nvidia_font.css",
8586
"css/nvidia_footer.css",
87+
"css/rtabs.css",
88+
"css/output-style.css",
8689
]
8790

8891
html_theme_options = {

docs/examples/advanced_optimizations.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"id": "6dcbf25a",
1414
"metadata": {},
1515
"source": [
16-
"This guide is a follow-up to the discussion in the [quickstart guide](quickstart.ipynb). We will focus on techniques to achieve maximum performance when training a basic GPT encoder layer. For convenience, we use some helper functions defined in [quickstart_utils.py](quickstart_utils.py). "
16+
"This guide is a follow-up to the discussion in the [Getting Started guide](../getting_started/index.rst). We will focus on techniques to achieve maximum performance when training a basic GPT encoder layer. For convenience, we use some helper functions defined in [quickstart_utils.py](quickstart_utils.py). "
1717
]
1818
},
1919
{

0 commit comments

Comments
 (0)