Skip to content

Commit 3654113

Browse files
committed
Arm backend: Add missing bool case in prepare_input_tensors
Before the commit that added a default case, booleans where never handled and set to 1 instead they just passed through gracefully. Now there is a case to handle booleans and set them to 1. Signed-off-by: per.held@arm.com Change-Id: I64d4cae231a258d0f732c7a12e2f0d1c3be521cf
1 parent d318b3b commit 3654113

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ Error prepare_input_tensors(
470470
tensor.mutable_data_ptr<int8_t>() + tensor.numel(),
471471
1);
472472
break;
473+
case ScalarType::Bool:
474+
std::fill(
475+
tensor.mutable_data_ptr<int8_t>(),
476+
tensor.mutable_data_ptr<int8_t>() + tensor.numel(),
477+
1);
478+
break;
473479
default:
474480
ET_LOG(Error, "Unhandled ScalarType");
475481
err = Error::InvalidArgument;

0 commit comments

Comments
 (0)