Skip to content
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

Enable linker script optimization for CUDA ARM wheel #1832

Merged
merged 4 commits into from
May 30, 2024

Conversation

tinglvv
Copy link
Collaborator

@tinglvv tinglvv commented May 24, 2024

follow up on https://github.com/pytorch/builder/pull/1828/files.
WAR to enable linker script optimization.

pytorch PR pytorch/pytorch#126174
tested by pytorch/pytorch#127514

cc @Aidyn-A @ptrblck @nWEIdia @atalman

@tinglvv tinglvv changed the title set the linker script env var Enable linker script optimization for CUDA ARM wheel May 24, 2024
nWEIdia
nWEIdia previously approved these changes May 24, 2024
Copy link
Collaborator

@nWEIdia nWEIdia left a comment

Choose a reason for hiding this comment

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

Looks great!

@nWEIdia
Copy link
Collaborator

nWEIdia commented May 24, 2024

@atalman please help prioritize this one

Aidyn-A
Aidyn-A previously approved these changes May 24, 2024
Copy link

@Aidyn-A Aidyn-A left a comment

Choose a reason for hiding this comment

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

Thank you very much, Ting!
It appears to be working now. Here is the log before this change (https://github.com/pytorch/pytorch/actions/runs/9229148090/job/25394747216?pr=126174 ):

2024-05-24T19:53:00.1145355Z BASE_CUDA_VERSION is set to: cu124
2024-05-24T19:53:00.1146026Z + python /builder/aarch64_linux/aarch64_wheel_ci_build.py --enable-mkldnn --enable-cuda
2024-05-24T19:53:00.1789747Z Building PyTorch wheel
2024-05-24T19:53:00.3634632Z Building wheel torch-2.4.0a0+git090c907
2024-05-24T19:53:00.6837713Z -------------------------------------------------------------------------------------------------
2024-05-24T19:53:00.6838754Z |                                                                                               |
2024-05-24T19:53:00.6839526Z |            WARNING: we strongly recommend enabling linker script optimization for ARM + CUDA. |
2024-05-24T19:53:00.6840421Z |            To do so please export USE_PRIORITIZED_TEXT_FOR_LD=1                               |
2024-05-24T19:53:00.6841104Z |                                                                                               |
2024-05-24T19:53:00.6841833Z -------------------------------------------------------------------------------------------------
2024-05-24T19:53:00.7274827Z running clean
2024-05-24T19:53:00.9344867Z Building OpenBLAS
2024-05-24T19:53:00.9352913Z Cloning into 'OpenBLAS'...

And after the change (https://github.com/pytorch/pytorch/actions/runs/9230224553/job/25398013014?pr=126174):

2024-05-24T21:46:28.1244483Z BASE_CUDA_VERSION is set to: cu124
2024-05-24T21:46:28.1245149Z + python /builder/aarch64_linux/aarch64_wheel_ci_build.py --enable-mkldnn --enable-cuda
2024-05-24T21:46:28.1892538Z Building PyTorch wheel
2024-05-24T21:46:28.3741742Z Building wheel torch-2.4.0a0+git8f729af
2024-05-24T21:46:28.7345907Z running clean
2024-05-24T21:46:28.9416764Z Building OpenBLAS
2024-05-24T21:46:28.9424643Z Cloning into 'OpenBLAS'...

@tinglvv
Copy link
Collaborator Author

tinglvv commented May 26, 2024

Thanks @Aidyn-A for pointing out the env var typo and verifying.

@tinglvv
Copy link
Collaborator Author

tinglvv commented May 26, 2024

@pytorchbot rebase

@tinglvv
Copy link
Collaborator Author

tinglvv commented May 27, 2024

Closing as this PR gets Manually-specified variables were not used by the project: USE_PRIORITIZED_TEXT_FOR_LD warning. Guessing we need to inject the env var in the yml file. Opening PR in pytorch/pytorch to test.

@tinglvv tinglvv closed this May 27, 2024
@tinglvv tinglvv reopened this May 28, 2024
@pytorch-bot pytorch-bot bot dismissed stale reviews from nWEIdia and Aidyn-A May 28, 2024 15:25

This PR was reopened (likely due to being reverted), so your approval was removed. Please request another review.

@tinglvv tinglvv merged commit fdaab5a into pytorch:main May 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants