- Notifications
You must be signed in to change notification settings - Fork26.3k
Fix vs2022 caused AVX512 illegal instruction issue.#153480
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
pytorch-botbot commentedMay 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🔗 Helpful Links🧪 See artifacts and rendered test results athud.pytorch.org/pr/153480
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit99978ab with merge basedccd19c ( NEW FAILURE - The following job has failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Blackhex left a comment
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. If it's desired, I'd suggest creating a GitHub issue to solve the root cause - removal of AVX512 intrinsic from code targeting AVX2 - and linking it to this PR.
xuhancn commentedMay 16, 2025
Upgrade VS2022 to latest can fix this issue, but I don't known how, please check here:#145702 (comment)@Blackhex can you check with Visual studio team to seek a solution? |
xuhancn commentedMay 16, 2025
@pytorchbot rebase |
pytorchmergebot commentedMay 16, 2025
@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere |
pytorchmergebot commentedMay 16, 2025
Successfully rebased |
a6214c5 to56e7d38CompareBlackhex commentedMay 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
IMO, thehttps://github.com/pytorch/pytorch/blob/56e7d38b9f9ee727caf7b86aa0cca5088c94a489/.ci/pytorch/windows/internal/vc_install_helper.bat script is not used for PR builds that are done withhttps://github.com/pytorch/pytorch/blob/56e7d38b9f9ee727caf7b86aa0cca5088c94a489/.ci/pytorch/win-test-helpers/build_pytorch.bat script which probably assumes the build tools already installed on the image. If that's true, it should be updated on AMI image or installation added (https://github.com/Blackhex/pytorch-test-infra/blob/main/aws/ami/windows/scripts/Installers/Install-VS.ps1). The installation script should be used for nightly wheels builds. Can you confirm or decline whether the update of build tools work there? PS: I am discussing with VS team what is the reason that the issue is not happening with newer build tools. I will need a small C++ repro case for that which will take some time to dissect from the codebase, unless someone already did that? |
xuhancn commentedMay 19, 2025
@pytorchbot rebase |
pytorchmergebot commentedMay 19, 2025
@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere |
pytorchmergebot commentedMay 19, 2025
Successfully rebased |
56e7d38 tocd0344dComparexuhancn commentedMay 19, 2025
@pytorchbot rebase |
pytorchmergebot commentedMay 19, 2025
@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere |
ffa3a12 toad4ada3CompareUh oh!
There was an error while loading.Please reload this page.
xuhancn commentedMay 20, 2025
atalman left a comment
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
xuhancn commentedMay 20, 2025
@pytorchbot merge |
pytorchmergebot commentedMay 20, 2025
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in thewiki. Questions? Feedback? Please reach out to thePyTorch DevX Team |
pytorchmergebot commentedMay 20, 2025
Merge failedReason: 1 jobs have failed, first few of them are:xpu / linux-jammy-xpu-2025.1-py3.9 / test (default, 6, 6, linux.idc.xpu) Details for Dev Infra teamRaised byworkflow job |
xuhancn commentedMay 20, 2025
@pytorchbot merge |
pytorchmergebot commentedMay 20, 2025
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in thewiki. Questions? Feedback? Please reach out to thePyTorch DevX Team |
pytorchmergebot commentedMay 20, 2025
Merge failedReason: 1 jobs have failed, first few of them are:xpu / linux-jammy-xpu-2025.1-py3.9 / test (default, 6, 6, linux.idc.xpu) Details for Dev Infra teamRaised byworkflow job |
xuhancn commentedMay 20, 2025
@pytorchbot merge -i |
pytorchmergebot commentedMay 20, 2025
Merge startedYour change will be merged while ignoring the following 2 checks:pull / cuda12.4-py3.10-gcc9-sm75 / test (pr_time_benchmarks, 1, 1, linux.g4dn.metal.nvidia.gpu),xpu / linux-jammy-xpu-2025.1-py3.9 / test (default, 6, 6, linux.idc.xpu) Learn more about merging in thewiki. Questions? Feedback? Please reach out to thePyTorch DevX Team |
malfet commentedJul 29, 2025
I couldn't find any documentation for d2implyavx512upperregs.... |
Blackhex commentedJul 30, 2025
Yeah, this flag is undocumented. I found out this is a solution to the problem from public (and internal) discussions likehttps://developercommunity.visualstudio.com/t/Code-gen-bug-uses-ymm16-register-for-AVX/10564317 |

Uh oh!
There was an error while loading.Please reload this page.
Fixes#145702
Add
/d2implyavx512upperregs-to disable compiler over-aggressive optimization, which caused involeved AVX512 register on AVX2 machine.Reference to:#145702 (comment)
Local test passed:

cc@peterjc123@mszhanyi@skyline75489@nbcsm@iremyux@Blackhex@jgong5@mingfeima@XiaobingSuper@sanchitintel@ashokei@jingxu10@jerryzh168