Skip to content

Commit 9c5994d

Browse files
zingofacebook-github-bot
authored andcommitted
Arm Backend: Generate input if not supplied in the non semihosting (#5308)
Summary: This will generate fake input filled with 1 instead of no input if no input is supplied. Pull Request resolved: #5308 Reviewed By: swolchok Differential Revision: D62645530 Pulled By: digantdesai fbshipit-source-id: fdb313dfee3413f87884ab6416af18e1ecf77a39
1 parent e8a557c commit 9c5994d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ Result<util::BufferCleanup> prepare_input_tensors(
9393
size_t num_inputs = method_meta.num_inputs();
9494
size_t num_allocated = 0;
9595

96+
#ifdef SEMIHOSTING
9697
ET_CHECK_OR_RETURN_ERROR(
9798
input_buffers.size() > 0 && num_inputs == input_buffers.size(),
9899
InvalidArgument,
99100
"Wrong number of inputs allocated compared to method");
101+
#endif
100102

101103
void** inputs =
102104
static_cast<void**>(allocator.allocate(num_inputs * sizeof(void*)));

0 commit comments

Comments
 (0)