Skip to content

Fix GenerationConfig initialization in qnn_multimodal_runner#19621

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D105377713
May 16, 2026
Merged

Fix GenerationConfig initialization in qnn_multimodal_runner#19621
meta-codesync[bot] merged 1 commit into
mainfrom
export-D105377713

Conversation

@kirklandsign
Copy link
Copy Markdown
Contributor

Summary:
...changes.

  • Replace fragile positional initialization with explicit field assignments
  • Improves code clarity by making field names explicit
  • Makes the code robust to future changes in GenerationConfig struct

Differential Revision: D105377713

Summary:
...changes.

- Replace fragile positional initialization with explicit field assignments
- Improves code clarity by making field names explicit
- Makes the code robust to future changes in GenerationConfig struct

Differential Revision: D105377713
Copilot AI review requested due to automatic review settings May 15, 2026 22:07
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 15, 2026

🔗 Helpful Links

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

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:

⏳ No Failures, 2 Pending

As of commit 7f53170 with merge base e6bf149 (image):
💚 Looks good so far! There are no failures yet. 💚

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 May 15, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 15, 2026

@kirklandsign has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105377713.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Switches the GenerationConfig aggregate-initializer in the QNN multimodal runner from positional to designated initializers so the call site is self-documenting and resilient to future field additions/reorderings in extension/llm/runner/irunner.h.

Changes:

  • Replace positional braced initializer of GenerationConfig with C++20 designated initializers naming each field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@GregoryComer GregoryComer left a comment

Choose a reason for hiding this comment

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

This is a C++20 feature, right? If it compiles, it's probably fine. I believe GCC/Clang support it as an extension on C++17 and we don't officially support MSVC + QNN at this point.

@kirklandsign kirklandsign added the release notes: none Do not include this in the release notes label May 15, 2026
@kirklandsign
Copy link
Copy Markdown
Contributor Author

This is a C++20 feature, right? If it compiles, it's probably fine. I believe GCC/Clang support it as an extension on C++17 and we don't officially support MSVC + QNN at this point.

GCC and Clang: These compilers have supported designated initializers as a "C extension" in C++ mode long before C++20. If you are using g++ or clang++ with -std=c++17, it will likely compile, though it might trigger a warning (e.g., -Wpedantic) saying "designated initializers are a C++20 extension."

MSVC (Visual Studio): Standard support started with MSVC 2019 v16.8. Earlier versions strictly following the C++17 standard will fail.

@meta-codesync meta-codesync Bot merged commit 42d87c4 into main May 16, 2026
207 of 212 checks passed
@meta-codesync meta-codesync Bot deleted the export-D105377713 branch May 16, 2026 02:07
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. fb-exported meta-exported release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants