Skip to content

Commit 534664d

Browse files
kimishpatelfacebook-github-bot
authored andcommitted
Cast error code to int (#1914)
Summary: Pull Request resolved: #1914 Otherwise fails for android build ghstack-source-id: 215452813 exported-using-ghexport Reviewed By: larryliu0820 Differential Revision: D53618175 fbshipit-source-id: 962ec6e586226002480e3ee0b99f02c63c8372ab
1 parent 5c6cefc commit 534664d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/models/llama2/runner/runner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Error Runner::generate(
239239
ET_CHECK_MSG(
240240
outputs_res.ok(),
241241
"Execution of method forward failed with status 0x%" PRIx32,
242-
outputs_res.error());
242+
static_cast<int32_t>(outputs_res.error()));
243243
// ET_LOG(Info, "Model executed successfully.");
244244

245245
std::vector<EValue> outputs = outputs_res.get();
@@ -265,7 +265,7 @@ Error Runner::generate(
265265
ET_CHECK_MSG(
266266
false,
267267
"Unsupported dtype output %hhd",
268-
logits_tensor.scalar_type());
268+
static_cast<int8_t>(logits_tensor.scalar_type()));
269269
}
270270

271271
// advance the state machine

0 commit comments

Comments
 (0)