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

This PR refactors the Getting Started documentation by consolidating the PyTorch and JAX quickstart notebooks into a unified guide using sphinx-tabs. The new structure provides a side-by-side comparison of both frameworks with progressive optimization examples.

Major Changes:

  • Replaced separate Jupyter notebooks with .rst documentation using sphinx-tabs for framework selection
  • Created comprehensive Python scripts (getting_started_pytorch.py, getting_started_jax.py) demonstrating progressive optimization from baseline to fully optimized TE implementations
  • Added real benchmark data from H100 GPU showing 2.06x-2.23x speedups with FP8
  • Improved documentation structure with visual diagrams and formatted output blocks
  • Added custom CSS styling for tabs and output display

Benefits:

  • Users can now easily compare PyTorch and JAX implementations side-by-side
  • Progressive examples clearly show the performance impact of each optimization step
  • Better organized content with a single entry point for both frameworks
  • Executable Python scripts instead of notebooks make examples more accessible

Confidence Score: 5/5

  • This PR is safe to merge with no risks - it's a pure documentation refactor
  • This is a documentation-only change that improves user experience. The new structure is well-organized, includes real benchmark data, and all dependencies are properly added to the build workflow. No code changes to the library itself.
  • No files require special attention

Important Files Changed

Filename Overview
docs/getting_started/index.rst Comprehensive new Getting Started guide with sphinx tabs for PyTorch/JAX examples and benchmark results
docs/getting_started/getting_started_pytorch.py Complete PyTorch example script with baseline and TE implementations, includes benchmarking code
docs/getting_started/getting_started_jax.py Complete JAX example script with baseline and TE implementations, includes benchmarking code
docs/conf.py Added sphinx_tabs extension and CSS files for tab-based documentation layout
.github/workflows/docs.yml Added sphinx-tabs dependency to documentation build workflow
docs/_static/css/rtabs.css Custom CSS styling for sphinx-tabs with NVIDIA green branding
docs/index.rst Updated reference from getting_started to getting_started/index for new structure

Sequence Diagram

sequenceDiagram
    participant Author as PR Author
    participant Docs as Documentation System
    participant User as Documentation User
    
    Author->>Docs: Remove old notebooks (quickstart.ipynb, quickstart_jax.ipynb)
    Author->>Docs: Create getting_started/ directory structure
    Author->>Docs: Add getting_started_pytorch.py with examples
    Author->>Docs: Add getting_started_jax.py with examples
    Author->>Docs: Add utility scripts (utils_pytorch.py, utils_jax.py)
    Author->>Docs: Run benchmarks and capture outputs (.out files)
    Author->>Docs: Generate summary CSV files with performance data
    Author->>Docs: Create index.rst with sphinx-tabs integration
    Author->>Docs: Add custom CSS (rtabs.css, output-style.css)
    Author->>Docs: Add transformer_layer.svg diagram
    Author->>Docs: Update conf.py with sphinx_tabs extension
    Author->>Docs: Update workflow to install sphinx-tabs dependency
    Author->>Docs: Update main index.rst to reference new location
    
    User->>Docs: Visit Getting Started page
    Docs->>User: Display unified guide with PyTorch/JAX tabs
    User->>Docs: Select framework tab (PyTorch or JAX)
    Docs->>User: Show framework-specific examples and benchmarks
    User->>Docs: View progressive optimization steps
    Docs->>User: Display performance improvements at each step
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
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.

1 participant