Skip to content

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

Open
zhaoxul-qti wants to merge 1 commit into
pytorch:mainfrom
CodeLinaro:dev1/zhaoxul/fix_designated_initializers_for_windows_MSVC
Open

Qualcomm AI Engine Direct - Remove C++ designated initializers for Windows MSVC#20441
zhaoxul-qti wants to merge 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.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

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!

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.

1 participant