Skip to content

Commit a31f8b9

Browse files
authored
Qualcomm AI Engine Direct - Remove C++ designated initializers for Windows MSVC (pytorch#20441)
### Summary This PR is a follow-up to pytorch#19686 Due to the changes in pytorch#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.
1 parent 01c25f8 commit a31f8b9

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

examples/qualcomm/oss_scripts/llama/qnn_multimodal_runner.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,15 @@ void start_multimodal_runner(
175175
buf.push_back(c);
176176
}
177177
};
178-
executorch::extension::llm::GenerationConfig config{
179-
.echo = true,
180-
.ignore_eos = false,
181-
.max_new_tokens = -1,
182-
.warming = false,
183-
.seq_len = FLAGS_seq_len,
184-
.temperature = static_cast<float>(FLAGS_temperature),
185-
.num_bos = 0,
186-
.num_eos = 0,
187-
};
178+
executorch::extension::llm::GenerationConfig config;
179+
config.echo = true;
180+
config.ignore_eos = false;
181+
config.max_new_tokens = -1;
182+
config.warming = false;
183+
config.seq_len = FLAGS_seq_len;
184+
config.temperature = static_cast<float>(FLAGS_temperature);
185+
config.num_bos = 0;
186+
config.num_eos = 0;
188187

189188
// 1. [Multimodal] Get raw files from input_list.txt
190189
std::vector<std::string> audio_raw_files;

0 commit comments

Comments
 (0)