Skip to content

Fix TE loading w/o meta packages#531

Merged
ipanfilo merged 3 commits intodevfrom
ipanfilo/wheel_load_pr
Apr 13, 2026
Merged

Fix TE loading w/o meta packages#531
ipanfilo merged 3 commits intodevfrom
ipanfilo/wheel_load_pr

Conversation

@ipanfilo
Copy link
Copy Markdown
Collaborator

@ipanfilo ipanfilo commented Apr 8, 2026

Description

Fix loading TE when install wheels w/o meta package

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

  • Fix installation validation w/o meta package
  • Add correct validation of frameworks extension installation

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

@ipanfilo ipanfilo requested a review from Micky774 April 8, 2026 16:04
@ipanfilo ipanfilo added the ci-level 1 CI test level 1 label Apr 8, 2026
Copy link
Copy Markdown
Contributor

@Micky774 Micky774 left a comment

Choose a reason for hiding this comment

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

Minor nits, and a couple questions regarding NV build behavior changes.

# If the framework extension pip package is installed, it means that TE is installed via
# PyPI. For this case we need to make sure that the metapackage, the core lib, and framework
# extension are all installed via PyPI and have matching versions.
# Metapackage and core lib matchiong is checked in `sanity_checks_for_pypi_installation()`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Metapackage and core lib matchiong is checked in `sanity_checks_for_pypi_installation()`,
# Metapackage and core lib matching is checked in `sanity_checks_for_pypi_installation()`,

raise RuntimeError(
"Found empty `transformer-engine` meta package installed. "
"Install `transformer-engine` with framework extensions via"
"'pip3 install --no-build-isolation transformer-engine[rocm_pytorch,rocm_jax]'"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"'pip3 install --no-build-isolation transformer-engine[rocm_pytorch,rocm_jax]'"
" 'pip3 install --no-build-isolation transformer-engine[rocm_pytorch,rocm_jax]'"


# Name of the pip extra dependency for framework extensions from PyPI.
extra_dep_name = module_name
extra_dep_name = framework
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This changes behavior for NV too, so let's guard it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Well, it it is apparent bug in upstream so I'd rather comment it but leave as-is

f"`transformer-engine-{'rocm' if is_rocm else 'cu'}*`." )

assert version(module_name) == version("transformer-engine") == te_core_version, (
assert version(package_name) == te_core_version, (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the NV build still need the version("transformer-engine") check?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For NV meta package (transformer-engine) is mandatory. For ROCm it is made optional so we can install w/o naming conflict with PyPi where transformer-engine is NV.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure but I just mean that upstream still retains the te version check here, so is it something redundant for even them or is it something that removing might impact expected behavior for an NV build?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh, yes, It is indeed redundant: on 2.12 sanity_checks_for_pypi_installation checks that core and meta versions match at

assert version("transformer-engine") == te_core_version, (

@ipanfilo ipanfilo requested a review from Micky774 April 9, 2026 00:05
@wangye805
Copy link
Copy Markdown
Collaborator

Hi @ipanfilo , do you have a simple issue description like how this issue can be triggered, like a jira/github ticket? Not quite sure what your "meta package" refers to? rocm_pytorch, rocm_jax?

@ipanfilo
Copy link
Copy Markdown
Collaborator Author

ipanfilo commented Apr 9, 2026

Hi @ipanfilo , do you have a simple issue description like how this issue can be triggered, like a jira/github ticket? Not quite sure what your "meta package" refers to? rocm_pytorch, rocm_jax?

Meta package refers for dummy transfer-engine wheel, the 4th (or the 1st) from the wheel set. Please refer https://github.com/ROCm/TransformerEngine/blob/dev/docs/installation.rst#pip---from-wheels , it tells about 2.10 changes on ROCm

@ipanfilo ipanfilo requested a review from wangye805 April 9, 2026 15:44
Copy link
Copy Markdown
Collaborator

@wangye805 wangye805 left a comment

Choose a reason for hiding this comment

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

LGTM

@ipanfilo ipanfilo merged commit 4297f03 into dev Apr 13, 2026
3 checks passed
@ipanfilo ipanfilo deleted the ipanfilo/wheel_load_pr branch April 13, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-level 1 CI test level 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants