Skip to content

Commit

Permalink
Arm Backend: Generate input if not supplied in the non semihosting (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
zingo authored and facebook-github-bot committed Sep 17, 2024
1 parent e8a557c commit 9c5994d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/arm/executor_runner/arm_executor_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ Result<util::BufferCleanup> prepare_input_tensors(
size_t num_inputs = method_meta.num_inputs();
size_t num_allocated = 0;

#ifdef SEMIHOSTING
ET_CHECK_OR_RETURN_ERROR(
input_buffers.size() > 0 && num_inputs == input_buffers.size(),
InvalidArgument,
"Wrong number of inputs allocated compared to method");
#endif

void** inputs =
static_cast<void**>(allocator.allocate(num_inputs * sizeof(void*)));
Expand Down

0 comments on commit 9c5994d

Please sign in to comment.