This patch makes changes in PACK GTests as per specification in NNAPI.
Refer #3864 for specification.
Signed-off-by: prasannar <prasanna.r@samsung.com>
auto input1 = model->addOperand(&type0);
auto input2 = model->addOperand(&type0);
auto input3 = model->addOperand(&type0);
+ auto num = model->addOperand(&type1);
auto axis = model->addOperand(&type1);
auto output = model->addOperand(&type2);
// Phase 2, operations
+ static int32_t num_init[] = {3};
+ model->setOperandValue(num, num_init, sizeof(int32_t) * 1);
static int32_t axis_init[] = {0};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 1);
- model->addOperationEx(ANEURALNETWORKS_PACK_EX, {input1, input2, input3, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_PACK_EX, {input1, input2, input3, num, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input1, input2, input3},
auto input1 = model->addOperand(&type0);
auto input2 = model->addOperand(&type0);
auto input3 = model->addOperand(&type0);
+ auto num = model->addOperand(&type1);
auto axis = model->addOperand(&type1);
auto output = model->addOperand(&type2);
// Phase 2, operations
+ static int32_t num_init[] = {3};
+ model->setOperandValue(num, num_init, sizeof(int32_t) * 1);
static int32_t axis_init[] = {2};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 1);
- model->addOperationEx(ANEURALNETWORKS_PACK_EX, {input1, input2, input3, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_PACK_EX, {input1, input2, input3, num, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input1, input2, input3},
i1 = Input("input1", "TENSOR_FLOAT32", "{2, 3, 4}")
i2 = Input("input2", "TENSOR_FLOAT32", "{2, 3, 4}")
i3 = Input("input3", "TENSOR_FLOAT32", "{2, 3, 4}")
+num = Int32Scalar("num", 3)
axis = Int32Scalar("axis", 0)
out = Output("output", "TENSOR_FLOAT32", "{3, 2, 3, 4}")
-model = model.Operation("PACK_EX", i1, i2, i3, axis).To(out)
+model = model.Operation("PACK_EX", i1, i2, i3, num, axis).To(out)
input0 = {i1: # input 0
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
i1 = Input("input1", "TENSOR_FLOAT32", "{2, 3, 4}")
i2 = Input("input2", "TENSOR_FLOAT32", "{2, 3, 4}")
i3 = Input("input3", "TENSOR_FLOAT32", "{2, 3, 4}")
+num = Int32Scalar("num", 3)
axis = Int32Scalar("axis", 2)
out = Output("output", "TENSOR_FLOAT32", "{2, 3, 3, 4}")
-model = model.Operation("PACK_EX", i1, i2, i3, axis).To(out)
+model = model.Operation("PACK_EX", i1, i2, i3, num, axis).To(out)
input0 = {i1: # input 0
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],