30 const auto &inputs = args.op.inputs;
31 const auto *options = args.op.builtin_options.AsIfOptions();
33 if (inputs.size() < 2)
35 if (args.op.outputs.size() < 1)
38 auto num_graphs =
static_cast<int32_t
>(args.reader.num_subgraph());
39 if (options->then_subgraph_index >=
num_graphs)
41 if (options->else_subgraph_index >=
num_graphs)
45 const auto tensors = args.reader.tensors();
46 const auto tensor = tensors.at(inputs.at(0));
47 assert(tensor !=
nullptr);
48 if (tensor->type() != circle::TensorType_BOOL)
51 const auto shape =
wrap(tensor->shape());
52 if (shape.size() != 1 && shape.size() != 0)