Skip to content

Fix WHEEL Tag mismatch in transformer-engine-cu12 wheels#2928

Open
eyupcanakman wants to merge 1 commit intoNVIDIA:mainfrom
eyupcanakman:fix/wheel-tag-py3-none
Open

Fix WHEEL Tag mismatch in transformer-engine-cu12 wheels#2928
eyupcanakman wants to merge 1 commit intoNVIDIA:mainfrom
eyupcanakman:fix/wheel-tag-py3-none

Conversation

@eyupcanakman
Copy link
Copy Markdown

Description

The transformer-engine-cu12 wheels on PyPI have a mismatch. The filename tag is py3-none-manylinux_2_28_x86_64. The internal WHEEL metadata Tag: is cp310-cp310-manylinux_2_28_x86_64, so tools that read the metadata treat the wheel as Python-3.10-only.

bdist_wheel is invoked with --python-tag=py3 which sets the filename, but the WHEEL Tag still reflects the build python (cp310). The fix sets the Tag to py3-none right before wheel pack, next to the existing Name: rewrites for the cu12 suffix.

Verified locally by replaying the sed steps against the published 2.13.0 x86_64 and aarch64 wheels; the repacked artifact's filename and internal Tag both become py3-none-manylinux_2_28_<arch>. No CI exercises build_wheels.sh.

Fixes #2896

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

  • Add a sed in build_tools/wheel_utils/build_wheels.sh that rewrites Tag: cp310-cp310 to Tag: py3-none in the WHEEL metadata before wheel pack. The literal cp310-cp310 matches the existing convention in this script (cp310 is hardcoded for the build interpreter in 7+ places).

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

bdist_wheel runs with --python-tag=py3 which sets the wheel
filename's tag, but the WHEEL metadata still records the build
python's tag (cp310-cp310). Set the Tag to py3-none in the WHEEL
file right before wheel pack so the metadata matches the filename.

Fixes NVIDIA#2896

Signed-off-by: Eyüp Can Akman <eyupcanakman@gmail.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Greptile Summary

This PR fixes a Tag: field mismatch in the WHEEL metadata for transformer-engine-cu12 wheels, where the filename correctly reflected py3-none (set via --python-tag=py3) but the internal metadata still recorded cp310-cp310 (from the build interpreter). The one-line sed is inserted at the right point in the script — after the dist-info directory is renamed and before wheel pack — so the repacked artifact's internal tag and filename are consistent.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no functional regressions and consistent with existing cp310 hardcoding conventions in the script.

The change is a single sed substitution operating on the correct file path (post-rename dist-info), the replacement string py3-none is the right tag for a generic Python 3 platform wheel, the -g flag safely handles any duplicate Tag lines, and the rest of the rename pipeline (whl_name_target construction from dist/ baseline) remains unaffected. No P0 or P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
build_tools/wheel_utils/build_wheels.sh Adds a sed rewrite of the WHEEL metadata Tag from cp310-cp310 to py3-none before wheel pack, fixing the internal tag / filename mismatch in transformer-engine-cu12 wheels.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[bdist_wheel --python-tag=py3 --plat-name=PLATFORM] --> B[dist/transformer_engine-VERSION-py3-none-PLATFORM.whl]
    B --> C[wheel unpack dist/*]
    C --> D[Rename dist-info: transformer_engine_cu12-VERSION.dist-info]
    D --> E[sed: Name rewrite in METADATA]
    E --> F["sed: Tag: cp310-cp310 → py3-none in WHEEL ✅ NEW"]
    F --> G[wheel pack transformer_engine-VERSION]
    G --> H[transformer_engine_cu12-VERSION-py3-none-PLATFORM.whl]
    H --> I[Derive whl_name_target from original dist/ filename]
    I --> J[mv *.whl /wheelhouse/whl_name_target]

    style F fill:#90EE90,stroke:#006400
Loading

Reviews (1): Last reviewed commit: "Fix WHEEL Tag mismatch in transformer-en..." | Re-trigger Greptile

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.

transformer-engine-cu12 PyPI wheels have incorrect WHEEL tag (cp310 hardcoded), causing reinstall loops

1 participant