Commit cdcc915
authored
Summary:
Fixes 3 `-Werror` diagnostics that broke the qualcomm llama runner build
on
`cfg:android-arm64-clang19-no-san` and disabled the following test infra
targets:
- `xplat/executorch/examples/qualcomm/oss_scripts/llama:runner_lib`
-
`xplat/executorch/examples/qualcomm/oss_scripts/llama:runner_lib_static`
-
`xplat/executorch/examples/qualcomm/oss_scripts/llama:qnn_llama_runner`
-
`xplat/executorch/examples/qualcomm/oss_scripts/llama:qnn_llama_runner_static`
Three diagnostics fixed:
1. `-Wreorder-ctor` in `runner.cpp`: `attention_sink_rope_module_` is
declared as the 2nd field of `Runner<T>` (right after `module_`) but the
constructor initializer list appended it last, after `tokenizer_`. Moved
it to the correct position in the init list to match declaration order.
Recent regression introduced in the attention-sink diff (#16574).
2. `-Woverloaded-virtual` in `lhd_token_generator.h` and
`multimodal_lhd_token_generator.h`: the derived classes define a
`prepare_io(std::vector<uint64_t>, std::vector<int32_t>)` overload that
hides the base class virtual `prepare_io(uint64_t, int64_t)`. Added a
`using TokenGenerator<T>::prepare_io;` (and equivalent for the
multimodal hierarchy) declaration so the base virtual stays in scope and
the warning is silenced without changing behavior. Latent bug surfaced
by the clang19 toolchain bump.
3. `-Wdelete-non-abstract-non-virtual-dtor` in `prompt_processor.h`:
`PromptProcessor<T>` has virtual member functions but no virtual
destructor, so deleting via `std::unique_ptr<PromptProcessor<T>>` in
`Runner` was undefined behavior under strict warnings. Added
`virtual ~PromptProcessor() = default;` mirroring the pattern already
used in `TokenGenerator` (`token_generator.h`). Also transitively
fixes `MultimodalPromptProcessor<T>`.
Reviewed By: rascani
Differential Revision: D103991803
1 parent 3ffaf27 commit cdcc915
4 files changed
Lines changed: 10 additions & 2 deletions
File tree
- examples/qualcomm/oss_scripts/llama/runner
- multimodal_runner
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments