Skip to content

Conversation

@ksivaman
Copy link
Member

Description

Document all environment variables used in TE.

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

Changes

Document all environment variables used in TE.

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

Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
@ksivaman ksivaman requested a review from pggPL December 31, 2025 12:59
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 31, 2025

Greptile Summary

This PR adds comprehensive documentation for all environment variables used in Transformer Engine. The new envvars.rst file documents 60+ environment variables organized into logical categories (build-time and runtime), with clear type annotations, defaults, and descriptions. The documentation includes practical examples for common use cases like debug builds, FP8 configuration, and profiling. The file is properly integrated into the documentation index under the Advanced section.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it only adds documentation without changing any code.
  • Documentation-only change that adds valuable reference material. No code changes means no risk of introducing bugs or breaking functionality. The RST format is correct and consistent with existing documentation structure.
  • No files require special attention

Important Files Changed

Filename Overview
docs/envvars.rst Comprehensive new documentation for all TE environment variables with proper RST formatting, clear sections, and practical examples.
docs/index.rst Added envvars documentation link to the Advanced section of the index.

Sequence Diagram

sequenceDiagram
    participant User
    participant Docs as Documentation Site
    participant Index as docs/index.rst
    participant EnvVars as docs/envvars.rst
    
    User->>Docs: Navigate to documentation
    Docs->>Index: Load index page
    Index->>Index: Display "Advanced" section
    Note over Index: Added envvars link
    User->>Index: Click "Environment Variables"
    Index->>EnvVars: Load envvars.rst
    EnvVars->>EnvVars: Render RST documentation
    Note over EnvVars: Build-Time Variables<br/>Runtime Variables<br/>Examples
    EnvVars->>User: Display formatted documentation
    Note over User: Can reference 60+ environment<br/>variables with types,<br/>defaults, and examples
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/envvars.rst, line 380-399 (link)

    style: Missing NVTE_DPA_FP8_RECIPE_DPA and NVTE_DPA_FP8_RECIPE_MHA (used in transformer_engine/pytorch/attention/multi_head_attention.py:42-43). Also missing: NVTE_AG_P2P_MULTI_ATOMIC, NVTE_APPLY_QK_LAYER_SCALING, NVTE_BATCH_MHA_P2P_COMM, NVTE_CUDA_ARCHS, several internal/experimental variables

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 31, 2025

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

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/envvars.rst, line 2 (link)

    syntax: Copyright year should be 2026 to match other documentation files

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Collaborator

@pggPL pggPL left a comment

Choose a reason for hiding this comment

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

Looks really nice in HTML, I added some small suggestion to cpu coffloading envvar.

Co-authored-by: Paweł Gadziński <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Copy link
Collaborator

@pggPL pggPL left a comment

Choose a reason for hiding this comment

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

LGTM

@ksivaman ksivaman merged commit 27dc83b into NVIDIA:main Jan 2, 2026
13 checks passed
@ksivaman ksivaman deleted the document_envvars branch January 2, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants