Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed

Conversation

@xuhancn
Copy link
Collaborator

@xuhancnxuhancn commentedMay 13, 2025
edited
Loading

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:
image

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

sanchitintel reacted with thumbs up emoji
@pytorch-bot
Copy link

pytorch-botbot commentedMay 13, 2025
edited
Loading

🔗 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 Failure

As of commit99978ab with merge basedccd19c (image):

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.

@xuhancnxuhancn added topic: not user facingtopic category ciflow/binariesTrigger all binary build and upload jobs on the PR module: windowsWindows support for PyTorch ciflow/trunkTrigger trunk jobs on your pull request intelThis tag is for PR from Intel labelsMay 13, 2025
@xuhancnxuhancn changed the titlefix vs2022 illegal instruction.Fix vs2022 caused AVX512 illegal instruction issue.May 15, 2025
@xuhancnxuhancn marked this pull request as ready for reviewMay 15, 2025 17:28
@xuhancnxuhancn requested a review froma team as acode ownerMay 15, 2025 17:28
@xuhancnxuhancn added the module: cpuCPU specific problem (e.g., perf, algorithm) labelMay 15, 2025
Copy link
Collaborator

@BlackhexBlackhex left a 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
Copy link
CollaboratorAuthor

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.

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?

Blackhex reacted with thumbs up emoji

@xuhancn
Copy link
CollaboratorAuthor

@pytorchbot rebase

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere

@pytorchmergebot
Copy link
Collaborator

Successfully rebasedxu_fix_vs2022_illegal_instruction ontorefs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, viagit checkout xu_fix_vs2022_illegal_instruction && git pull --rebase)

@pytorchmergebotpytorchmergebotforce-pushed thexu_fix_vs2022_illegal_instruction branch froma6214c5 to56e7d38CompareMay 16, 2025 06:43
@Blackhex
Copy link
Collaborator

Blackhex commentedMay 16, 2025
edited
Loading

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?

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 reacted with eyes emoji

@xuhancn
Copy link
CollaboratorAuthor

@pytorchbot rebase

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere

@pytorchmergebot
Copy link
Collaborator

Successfully rebasedxu_fix_vs2022_illegal_instruction ontorefs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, viagit checkout xu_fix_vs2022_illegal_instruction && git pull --rebase)

@pytorchmergebotpytorchmergebotforce-pushed thexu_fix_vs2022_illegal_instruction branch from56e7d38 tocd0344dCompareMay 19, 2025 12:05
@xuhancnxuhancn added the ciflow/xpuRun XPU CI tasks labelMay 19, 2025
@xuhancn
Copy link
CollaboratorAuthor

@pytorchbot rebase

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job ontorefs/remotes/origin/viable/strict. Check the current statushere

@xuhancnxuhancnforce-pushed thexu_fix_vs2022_illegal_instruction branch fromffa3a12 toad4ada3CompareMay 20, 2025 05:40
@xuhancn
Copy link
CollaboratorAuthor

image

Double confirmed the latest changes.

Copy link
Contributor

@atalmanatalman left a comment

Choose a reason for hiding this comment

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

lgtm

@xuhancn
Copy link
CollaboratorAuthor

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 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
Copy link
CollaboratorAuthor

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 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
Copy link
CollaboratorAuthor

@pytorchbot merge -i

pytorch-bot[bot] reacted with thumbs up emoji

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@xuhancnxuhancn deleted the xu_fix_vs2022_illegal_instruction branchMay 20, 2025 20:37
pytorchmergebot pushed a commit that referenced this pull requestJun 10, 2025
This reverts commite4f2282.I believe fix PR was landed#153480 that triggered the revert.Hence this is reland.Pull Requestresolved:#155478Approved by:https://github.com/malfet
@malfet
Copy link
Contributor

I couldn't find any documentation for d2implyavx512upperregs....

@Blackhex
Copy link
Collaborator

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cyyevercyyevercyyever approved these changes

@BlackhexBlackhexBlackhex approved these changes

@atalmanatalmanatalman approved these changes

@malfetmalfetAwaiting requested review from malfet

Assignees

No one assigned

Labels

ciflow/binariesTrigger all binary build and upload jobs on the PRciflow/trunkTrigger trunk jobs on your pull requestciflow/xpuRun XPU CI tasksintelThis tag is for PR from IntelMergedmodule: cpuCPU specific problem (e.g., perf, algorithm)module: windowsWindows support for PyTorchopen sourcetopic: not user facingtopic category

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

PyTorch VS2022 official build Windows binary illegal instruction on AVX2(max ISA level) CPU

7 participants

@xuhancn@pytorchmergebot@Blackhex@malfet@atalman@cyyever@pytorchbot

[8]ページ先頭

©2009-2025 Movatter.jp