Skip to content

Qualcomm AI Engine Direct - Remove C++ designated initializers for Windows MSVC - #20441

Merged
psiddh merged 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/zhaoxul/fix_designated_initializers_for_windows_MSVC
Jul 2, 2026
Merged

Qualcomm AI Engine Direct - Remove C++ designated initializers for Windows MSVC#20441
psiddh merged 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/zhaoxul/fix_designated_initializers_for_windows_MSVC

Conversation

@zhaoxul-qti

Copy link
Copy Markdown
Contributor

Summary

This PR is a follow-up to #19686

Due to the changes in #19621, additional adjustments are required for Windows MSVC compatibility. This PR removes remaining C++ designated initializers and aligns the implementation accordingly.

  • Designated initializers for C++ aggregates were standardized in C++20.
  • GCC and Clang have supported them as a C++11/14/17 extension — they silently accept the syntax even when compiling in -std=c++17 mode.
  • MSVC is strictly conformant: it only accepts designated initializers when /std:c++20 (or /std:c++latest) is active.

…ndows MSVC

- Designated initializers for C++ aggregates were standardized in C++20. GCC and Clang have supported them as a C++11/14/17 extension.
  They silently accept the syntax even when compiling in -std=c++17 mode.
- MSVC is strictly conformant: it only accepts designated initializers when /std:c++20 (or /std:c++latest) is active.
@pytorch-bot

pytorch-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20441

Note: Links to docs will display an error until the docs builds have been completed.

❌ You can merge normally! (1 Unrelated Failure), 2 Unclassified Failures

As of commit a55d31d with merge base 60b1351 (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 23, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@zhaoxul-qti

Copy link
Copy Markdown
Contributor Author

Hi @GregoryComer and @psiddh,
This PR is required to support build QNN ExecuTorch with Windows MSVC.

Thanks for the review!

@meta-codesync

meta-codesync Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@psiddh has imported this pull request. If you are a Meta employee, you can view this in D109863039.

@zhaoxul-qti

Copy link
Copy Markdown
Contributor Author

Hi @psiddh,
Thanks for the review!

It appears that the test-llama-runner-qnn-linux job encountered an error in CI. After taking a look, it seems to be caused by an unstable connection.
Would you mind retriggering the CI to see if the issue persists?
Thanks!

@shewu-quic

shewu-quic commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Hi @psiddh ,
This PR is to fix qualcomm windows build failure due to the PR

@shewu-quic

Copy link
Copy Markdown
Collaborator

Don't worry. We will add a test case for qualcomm windows build to avoid this situation in the community

@psiddh

psiddh commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Do yo know why pull / test-llama-runner-qnn-linux (fp32, qnn_16a16w, qnn) / linux-job (pull_request)Failing after 33m is failing ? I assume it is unrelated

@shewu-quic

shewu-quic commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Do yo know why pull / test-llama-runner-qnn-linux (fp32, qnn_16a16w, qnn) / linux-job (pull_request)Failing after 33m is failing ? I assume it is unrelated

I think it is unrelated.

@psiddh
psiddh merged commit a31f8b9 into pytorch:main Jul 2, 2026
196 of 201 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants