Improve wheel naming logic in ansible #8465
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #8406. The existing "Rename and append +YYYYMMDD suffix to nightly wheels" ansible action is pretty confusing since it operates on files in both pytorch/xla/dist and /tmp/staging-wheels. Inadvertently this causes the next "Add cxx11 suffix to wheels built with C++11 ABI" action to miss renaming
"torch_xla-2.6.0.dev-cp310-cp310-linux_x86_64.whl", which means we're uploading a C++11 ABI wheel to a non-C++11 location. I've refactored the ansible actions to only operate under /tmp/staging-wheels.
Under local ansible test runs:
When cxx_abi=0, ansible creates these files under /dist:
torch-2.6.0.dev-cp310-cp310-linux_x86_64.whl
torch-2.6.0.dev20241206-cp310-cp310-linux_x86_64.whl
torch_xla-2.6.0.dev-cp310-cp310-linux_x86_64.whl
torch_xla-2.6.0.dev20241206-cp310-cp310-linux_x86_64.whl
torchvision-0.19.0a0+d23a6e1-cp310-cp310-linux_x86_64.whl
When cxx_abi=1, ansible creates these files under /dist:
torch-2.6.0.dev.cxx11-cp310-cp310-linux_x86_64.whl
torch-2.6.0.dev20241206.cxx11-cp310-cp310-linux_x86_64.whl
torch_xla-2.6.0.dev.cxx11-cp310-cp310-linux_x86_64.whl
torch_xla-2.6.0.dev20241206.cxx11-cp310-cp310-linux_x86_64.whl
torchvision-0.19.0a0+d23a6e1.cxx11-cp310-cp310-linux_x86_64.whl
The files under /dist are then uploaded to GCS.
I also added documentation about C++11 ABI wheels to the README.