-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Download pre-compiled AOTriton from GitHub unless AOTRITON_INSTALL_FROM_SOURCE=1 is set #136603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download pre-compiled AOTriton from GitHub unless AOTRITON_INSTALL_FROM_SOURCE=1 is set #136603
Conversation
Otherwise bdist_wheel will miss libaotriton_v2.so
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/136603
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 6 Cancelled Jobs, 12 Unrelated FailuresAs of commit e0c0948 with merge base e4cdc31 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
ROCm CI regular as well as manylinux build jobs succeeded. Those test the preinstalled_aotriton scenario. I tested the build-from-source as well as the non-preinstalled, non-build-from-source scenarios locally and both installed the aotriton 0.7b version as expected. |
| install(DIRECTORY | ||
| $ENV{AOTRITON_INSTALLED_PREFIX}/lib | ||
| $ENV{AOTRITON_INSTALLED_PREFIX}/include | ||
| DESTINATION ${__AOTRITON_INSTALL_DIR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snippet adds the libaotriton_v2.so to the torch/lib directory so that it gets packaged with the pytorch wheel if building pytorch from source using a simple python setup.py bdist_wheel command, thus making the wheel portable.
| INSTALL_DIR ${__AOTRITON_INSTALL_DIR} | ||
| CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${__AOTRITON_INSTALL_DIR} | ||
| -DAOTRITON_COMPRESS_KERNEL=OFF | ||
| -DAOTRITON_COMPRESS_KERNEL=ON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kernel compression results in a smaller aotriton shared library, avoiding linker errors when we have a large number of gfx targets being built for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
@pytorchbot merge -f "Unrelated CI failures" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot cherry-pick --onto release/2.5 -c critical |
…OM_SOURCE=1 is set (#136603) PyTorch community members have reported issues with building PyTorch from source for ROCm in an environment that doesn't have aotriton pre-installed, because aotriton is only installed in the [CI](https://github.com/pytorch/pytorch/blob/a8ed873ba2aa13437a336863ae9d73c235798acc/.ci/docker/ubuntu-rocm/Dockerfile#L110)/[manywheel](https://github.com/pytorch/pytorch/blob/a8ed873ba2aa13437a336863ae9d73c235798acc/.ci/docker/manywheel/Dockerfile#L197) docker images. Building aotriton from source can take ~45 minutes. This PR fixes the issue by downloading the aotriton tarball in such scenarios, *unless the user explicitly wants to build aotriton from source using the AOTRITON_INSTALL_FROM_SOURCE=1 env var* Pull Request resolved: #136603 Approved by: https://github.com/atalman Co-authored-by: Xinya Zhang <Xinya.Zhang@amd.com> (cherry picked from commit 851b973)
Cherry picking #136603The cherry pick PR is at #136786 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
@jithunnair-amd can you please elaborate why this is a critical to cherry-pick into release branch? |
It fixes the issues PyTorch community users face when doing build-from-source of PyTorch on ROCm. I assumed that would come under "critical". |
|
Is building from source relevant for release really? |
I'll go with release management team's assessment on that. I assumed that we would want release branches to also build-from-source successfully, but if that's only considered important for |
PyTorch community members have reported issues with building PyTorch from source for ROCm in an environment that doesn't have aotriton pre-installed, because aotriton is only installed in the CI/manywheel docker images. Building aotriton from source can take ~45 minutes.
This PR fixes the issue by downloading the aotriton tarball in such scenarios, unless the user explicitly wants to build aotriton from source using the AOTRITON_INSTALL_FROM_SOURCE=1 env var
Two more issues this PR addresses: #136603 (comment) and #136603 (comment)