We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31ba154 commit bb5e19dCopy full SHA for bb5e19d
extension/runner_util/inputs.cpp
@@ -23,10 +23,17 @@ Result<BufferCleanup> prepare_input_tensors(Method& method) {
23
void** inputs = (void**)malloc(num_inputs * sizeof(void*));
24
25
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
34
Result<TensorInfo> tensor_meta = method_meta.input_tensor_meta(i);
35
if (!tensor_meta.ok()) {
- ET_LOG(Info, "Skipping non-tensor input %zu", i);
- continue;
36
+ return tensor_meta.error();
37
}
38
// This input is a tensor. Allocate a buffer for it.
39
void* data_ptr = malloc(tensor_meta->nbytes());
0 commit comments