Skip to content

Commit 2df076d

Browse files
kirklandsignStrycekSimon
authored andcommitted
Add const qualifier to multimodal prefill (pytorch#14494)
Easier for rvalue inputs
1 parent 5e27f18 commit 2df076d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extension/llm/runner/multimodal_runner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Error MultimodalRunner::load() {
6262
ET_LOG(Info, format, __VA_ARGS__); \
6363
}
6464

65-
Error MultimodalRunner::prefill(std::vector<MultimodalInput>& inputs) {
65+
Error MultimodalRunner::prefill(const std::vector<MultimodalInput>& inputs) {
6666
if (!is_loaded()) {
6767
ET_CHECK_OK_OR_RETURN_ERROR(load());
6868
}

extension/llm/runner/multimodal_runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class ET_EXPERIMENTAL MultimodalRunner {
126126
* @return The error code. KV cache position is tracked internally in pos_.
127127
*/
128128
virtual ::executorch::runtime::Error prefill(
129-
std::vector<MultimodalInput>& inputs);
129+
const std::vector<MultimodalInput>& inputs);
130130

131131
inline void stop() {
132132
text_token_generator_->stop();

0 commit comments

Comments
 (0)