Skip to content

Conversation

@tdophung
Copy link
Collaborator

@tdophung tdophung commented Jan 13, 2026

Description

Since pytorch-triton is a placeholder in PyPI, it should not be auto fetched and install in TE build. Users that uses torch should already have pytorch-triton installed when they install torch whl.

WE should also not revert this to requires 'triton' either because it is currently not compatible with torch.compile

Fixes # (issue)

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

remove pytorch-triton from list of requirements in TE PyTorch build

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

…rch-triton as it is a placeeholder in pyPI

Signed-off-by: tdophung <tdophung@nvidia.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 13, 2026

Greptile Summary

This PR removes pytorch-triton from the build requirements list in build_tools/pytorch.py. The change is correct because pytorch-triton on PyPI is a placeholder package that raises "Should never be installed" errors. Users who install PyTorch already have pytorch-triton bundled with their torch installation from PyTorch's package index, making it unnecessary and problematic to list as a build requirement.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change correctly removes a problematic dependency that was causing installation failures. PyTorch users already have pytorch-triton installed from their torch installation, and the PyPI placeholder version is non-functional. The codebase's triton imports will continue to work as expected since they rely on the version bundled with PyTorch.
  • No files require special attention

Important Files Changed

Filename Overview
build_tools/pytorch.py Removes pytorch-triton from install requirements and simplifies docstring

Sequence Diagram

sequenceDiagram
    participant User
    participant pip
    participant setup.py
    participant pytorch.py
    participant PyTorch

    User->>pip: pip install transformer_engine_torch
    pip->>setup.py: Execute setup
    setup.py->>pytorch.py: Call install_requirements()
    
    alt Before this PR
        pytorch.py-->>setup.py: Returns list with pytorch-triton
        setup.py->>pip: Install pytorch-triton (placeholder on PyPI)
        Note over pip: Would fail: pytorch-triton on PyPI<br/>is a placeholder
    end
    
    alt After this PR
        pytorch.py-->>setup.py: Returns list without pytorch-triton
        setup.py->>pip: Install dependencies (no pytorch-triton)
        Note over pip: Success: Users already have<br/>pytorch-triton from torch install
    end
    
    User->>PyTorch: Already has pytorch-triton<br/>from torch installation
    Note over User,PyTorch: torch.compile() can use<br/>pre-installed pytorch-triton
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. build_tools/pytorch.py, line 16-26 (link)

    style: docstring is now outdated since pytorch-triton is no longer in the requirements list

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

ptrendx
ptrendx previously approved these changes Jan 13, 2026
@ptrendx
Copy link
Member

ptrendx commented Jan 13, 2026

Could you change the docstring too @tdophung? Since it now incorrectly mentions pytorch-triton.

Signed-off-by: tdophung <tdophung@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants