File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,20 @@ int32_t main(int32_t argc, char** argv) {
100
100
}
101
101
102
102
if (warmup) {
103
- runner->warmup (prompt, /* max_new_tokens=*/ seq_len);
103
+ auto error = runner->warmup (prompt, /* max_new_tokens=*/ seq_len);
104
+ if (error != executorch::runtime::Error::Ok) {
105
+ ET_LOG (Error, " Failed to warmup llama runner" );
106
+ return 1 ;
107
+ }
104
108
}
105
109
// generate
106
110
executorch::extension::llm::GenerationConfig config{
107
111
.seq_len = seq_len, .temperature = temperature};
108
- runner->generate (prompt, config);
112
+ auto error = runner->generate (prompt, config);
113
+ if (error != executorch::runtime::Error::Ok) {
114
+ ET_LOG (Error, " Failed to warmup llama runner" );
115
+ return 1 ;
116
+ }
109
117
110
118
return 0 ;
111
119
}
You can’t perform that action at this time.
0 commit comments