Skip to content

Commit 4598fdb

Browse files
authored
Set an empty EValue input for models that expect None arg. (#13621)
1 parent bbc281f commit 4598fdb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extension/runner_util/inputs.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ Result<BufferCleanup> prepare_input_tensors(
5555
BufferCleanup cleanup({inputs, num_allocated});
5656
return tag.error();
5757
}
58+
if (tag.get() == Tag::None) {
59+
Error err = method.set_input(runtime::EValue(), i);
60+
if (err != Error::Ok) {
61+
BufferCleanup cleanup({inputs, num_allocated});
62+
return err;
63+
}
64+
continue;
65+
}
5866
if (tag.get() != Tag::Tensor) {
5967
ET_LOG(Debug, "Skipping non-tensor input %zu", i);
6068
continue;

0 commit comments

Comments
 (0)