Skip to content

Commit bfdd8ab

Browse files
tarun292facebook-github-bot
authored andcommitted
Change log to debug for const_inputs in runner_util (#1810)
Summary: Pull Request resolved: #1810 These are all valid input types now in an Executorch program. Reviewed By: JacobSzwejbka Differential Revision: D53335087 fbshipit-source-id: ae6bcb17dc0ca054cc00fd6bc29599955542abb5
1 parent 5d7edcb commit bfdd8ab

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

extension/runner_util/inputs.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ Result<BufferCleanup> prepare_input_tensors(Method& method) {
2323
void** inputs = (void**)malloc(num_inputs * sizeof(void*));
2424

2525
for (size_t i = 0; i < num_inputs; i++) {
26+
auto tag = method_meta.input_tag(i);
27+
if (!tag.ok()) {
28+
return tag.error();
29+
}
30+
if (tag.get() != Tag::Tensor) {
31+
ET_LOG(Debug, "Skipping non-tensor input %zu", i);
32+
continue;
33+
}
2634
Result<TensorInfo> tensor_meta = method_meta.input_tensor_meta(i);
2735
if (!tensor_meta.ok()) {
28-
ET_LOG(Info, "Skipping non-tensor input %zu", i);
29-
continue;
36+
return tensor_meta.error();
3037
}
3138
// This input is a tensor. Allocate a buffer for it.
3239
void* data_ptr = malloc(tensor_meta->nbytes());

0 commit comments

Comments
 (0)