Skip to content

Conversation

@pggPL
Copy link
Collaborator

@pggPL pggPL commented Dec 18, 2025

Description

Refactored getting started in the docs by adding sphinx tabs.

It's better to download the artifact rather than reading the changes.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@pggPL pggPL changed the title Getting started refactor [docs] Getting started refactor Dec 18, 2025
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 18, 2025

Greptile Summary

Refactored getting started documentation from separate Jupyter notebooks to unified RST format with sphinx tabs for PyTorch and JAX frameworks.

  • Replaced docs/examples/quickstart.ipynb and docs/examples/quickstart_jax.ipynb with new docs/getting_started/index.rst using sphinx tabs
  • Moved from notebook format to Python scripts with separate output files for better maintainability
  • Added sphinx-tabs extension (3.4.7) with custom NVIDIA-branded CSS styling
  • Created comprehensive tutorial progression: Baseline → TE Unfused → TE Unfused + Attention → FP8 → Fused → TransformerLayer
  • Included benchmark outputs showing 2.23x speedup for PyTorch and 3.80x for JAX
  • Added SVG diagram and CSV summary tables for performance metrics
  • Updated documentation structure with proper literalinclude directives

Confidence Score: 5/5

  • This PR is safe to merge with no concerns - purely documentation changes
  • Documentation-only refactor with no code changes to library functionality, well-structured implementation using standard sphinx extensions, proper dependency management
  • No files require special attention

Important Files Changed

Filename Overview
docs/getting_started/index.rst New comprehensive getting started guide with sphinx tabs for PyTorch/JAX, well-structured tutorial progression
docs/conf.py Added sphinx-tabs extension and CSS imports to support tabbed interface
docs/_static/css/rtabs.css Custom styling for sphinx tabs with NVIDIA green branding
.github/workflows/docs.yml Added sphinx-tabs==3.4.7 dependency for documentation build
docs/getting_started/getting_started_pytorch.py Complete PyTorch implementation showing baseline to optimized TE modules
docs/getting_started/getting_started_jax.py Complete JAX/Flax implementation showing baseline to optimized TE modules

Sequence Diagram

sequenceDiagram
    participant User
    participant Sphinx
    participant Browser
    participant TabsExt as Sphinx Tabs Extension
    
    User->>Sphinx: Build documentation
    Sphinx->>Sphinx: Load conf.py with sphinx_tabs.tabs extension
    Sphinx->>Sphinx: Parse getting_started/index.rst
    Sphinx->>TabsExt: Process .. tabs:: directives
    TabsExt->>TabsExt: Generate PyTorch/JAX tab HTML
    TabsExt->>Sphinx: Return processed content
    Sphinx->>Sphinx: Include literalinclude from .py files
    Sphinx->>Sphinx: Include output from .out files
    Sphinx->>Sphinx: Include CSV tables from summary.csv
    Sphinx->>Sphinx: Apply custom CSS (rtabs.css, output-style.css)
    Sphinx->>Browser: Generate HTML documentation
    
    Browser->>User: Display getting started page
    User->>Browser: Click PyTorch/JAX tab
    Browser->>Browser: Switch tab content (JavaScript)
    Browser->>User: Show framework-specific tutorial
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. docs/getting_started/transformer_layer.svg, line 1 (link)

    style: Three identical copies of this SVG exist in the PR:

    1. docs/_static/images/transformer_layer.svg
    2. docs/getting_started/transformer_layer.svg (this file)
    3. docs/getting_started/_images/transformer_layer.svg

    The documentation at docs/getting_started/index.rst:53 references transformer_layer.svg directly, which should work. Consider keeping only one copy (preferably in _static/images/ or the current directory) to avoid redundancy.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

15 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@pggPL pggPL force-pushed the refactor_getting_started branch from 5a547ca to a9b4e62 Compare December 19, 2025 00:04
- 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]>
@pggPL pggPL force-pushed the refactor_getting_started branch from a9b4e62 to 802c747 Compare December 19, 2025 00:14
@pggPL pggPL requested a review from tdophung December 19, 2025 00:21
pggPL and others added 3 commits December 19, 2025 09:23
Signed-off-by: Pawel Gadzinski <[email protected]>
Signed-off-by: Pawel Gadzinski <[email protected]>
@pggPL pggPL added the documentation Improvements or additions to documentation label Dec 19, 2025
Copy link
Collaborator

@jberchtold-nvidia jberchtold-nvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Checked out the built docs locally and they look great! I also like how you set it up so all the JAX code for getting started is in a single getting_started_jax.py and same for PyTorch, so we get the benefit of both a) a unified tutorial doc with tabs, but also b) users wanting to work with directly JAX don't have to look thru a notebook with both PyTorch/JAX and could easily build off of this by editing the python file or even from getting_start_jax import SomeLayer while exploring TE

tdophung
tdophung previously approved these changes Jan 5, 2026
Copy link
Collaborator

@tdophung tdophung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pggPL pggPL dismissed stale reviews from tdophung and jberchtold-nvidia via 98dd12f January 5, 2026 22:17
Signed-off-by: Pawel Gadzinski <[email protected]>
@pggPL pggPL merged commit a976740 into NVIDIA:main Jan 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants