25 circlechef::ModelRecipe *model_recipe)
const
29 import->set_tensor_filler(inputs[0]);
31 const circle::Tensor *tensor1 =
import->tensors()->Get(inputs[1]);
32 assert(tensor1->type() == circle::TensorType::TensorType_INT32);
33 const circle::Buffer *buffer1 =
import->buffers()->Get(tensor1->buffer());
34 auto vec1 = extract_buffer<int32_t>(buffer1);
35 import->set_tensor_filler(inputs[1], vec1);
37 const circle::Tensor *tensor2 =
import->tensors()->Get(inputs[2]);
38 assert(tensor2->type() == circle::TensorType::TensorType_INT32);
39 const circle::Buffer *buffer2 =
import->buffers()->Get(tensor2->buffer());
40 auto vec2 = extract_buffer<int32_t>(buffer2);
41 import->set_tensor_filler(inputs[2], vec2);
43 const circle::Tensor *tensor3 =
import->tensors()->Get(inputs[3]);
44 assert(tensor3->type() == circle::TensorType::TensorType_INT32);
45 const circle::Buffer *buffer3 =
import->buffers()->Get(tensor3->buffer());
46 auto vec3 = extract_buffer<int32_t>(buffer3);
47 import->set_tensor_filler(inputs[3], vec3);
51 circlechef::ModelRecipe *model_recipe)
const
53 auto op_params = op->builtin_options_as_BCQGatherOptions();
54 assert(op_params !=
nullptr);
56 auto operation = model_recipe->add_operation();
58 operation->set_type(
"BCQGather");
60 auto op_options = operation->mutable_bcq_gather_options();
62 op_options->set_input_hidden_size(op_params->input_hidden_size());
63 op_options->set_axis(op_params->axis());