`GeneratedTests.gather_1D_uint8` and `GeneratedTests.gather_2D_uint8` are tests for `gather` operation using quant8 type
However, despite not correctly given test data format, two tests are passed because of weak dataset
And more seriously, `gather` operation do not support quant8 yet
Therefore we should disable the two tests
- Modify `_uint8` to `_quant8` in test name
- Modify test data for `GeneratedTests.gather_1D_uint8` and `GeneratedTests.gather_2D_uint8`
- Disable `GeneratedTests.gather_1D_uint8` and `GeneratedTests.gather_2D_uint8`
Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
gather_1D_int32::examples);
}
-namespace gather_1D_uint8 {
+namespace gather_1D_quant8 {
std::vector<MixedTypedExample> examples = {
-// Generated gather_1D_uint8 test
-#include "generated/examples/gather_1D_uint8.example.cpp"
+// Generated gather_1D_quant8 test
+#include "generated/examples/gather_1D_quant8.example.cpp"
};
// Generated model constructor
-#include "generated/models/gather_1D_uint8.model.cpp"
-} // namespace gather_1D_uint8
-TEST_F(GeneratedTests, gather_1D_uint8) {
- execute(gather_1D_uint8::CreateModel,
- gather_1D_uint8::is_ignored,
- gather_1D_uint8::examples);
+#include "generated/models/gather_1D_quant8.model.cpp"
+} // namespace gather_1D_quant8
+TEST_F(GeneratedTests, gather_1D_quant8) {
+ execute(gather_1D_quant8::CreateModel,
+ gather_1D_quant8::is_ignored,
+ gather_1D_quant8::examples);
}
namespace gather_2D_float {
gather_2D_int32::examples);
}
-namespace gather_2D_uint8 {
+namespace gather_2D_quant8 {
std::vector<MixedTypedExample> examples = {
-// Generated gather_2D_uint8 test
-#include "generated/examples/gather_2D_uint8.example.cpp"
+// Generated gather_2D_quant8 test
+#include "generated/examples/gather_2D_quant8.example.cpp"
};
// Generated model constructor
-#include "generated/models/gather_2D_uint8.model.cpp"
-} // namespace gather_2D_uint8
-TEST_F(GeneratedTests, gather_2D_uint8) {
- execute(gather_2D_uint8::CreateModel,
- gather_2D_uint8::is_ignored,
- gather_2D_uint8::examples);
+#include "generated/models/gather_2D_quant8.model.cpp"
+} // namespace gather_2D_quant8
+TEST_F(GeneratedTests, gather_2D_quant8) {
+ execute(gather_2D_quant8::CreateModel,
+ gather_2D_quant8::is_ignored,
+ gather_2D_quant8::examples);
}
namespace tensorflowmax_ex_2D_float {
// int -> INT32 map
{{1, {2, 0}}},
// int -> QUANT8_ASYMM map
- {{0, {3, 4, 5, 6}}}
+ {{0, {7, 9, 11, 13}}}
},
//Output(s)
{ // See tools/test_generator/include/TestHarness.h:MixedTyped
// int -> INT32 map
{},
// int -> QUANT8_ASYMM map
- {{0, {5, 3}}}
+ {{0, {11, 7}}}
}
}, // End of an example
// int -> INT32 map
{{1, {2, 0}}},
// int -> QUANT8_ASYMM map
- {{0, {3, 4, 5, 6, 7, 8, 9, 1, 2, 18, 19, 11}}}
+ {{0, {7, 9, 11, 13, 15, 17, 19, 3, 5, 37, 39, 23}}}
},
//Output(s)
{ // See tools/test_generator/include/TestHarness.h:MixedTyped
// int -> INT32 map
{},
// int -> QUANT8_ASYMM map
- {{0, {2, 18, 19, 11, 3, 4, 5, 6}}}
+ {{0, {5, 37, 39, 23, 7, 9, 11, 13}}}
}
}, // End of an example
void CreateModel(Model *model) {
OperandType type2(Type::INT32, {});
OperandType type1(Type::TENSOR_INT32, {2});
- OperandType type3(Type::TENSOR_QUANT8_ASYMM, {2});
- OperandType type0(Type::TENSOR_QUANT8_ASYMM, {4});
+ OperandType type3(Type::TENSOR_QUANT8_ASYMM, {2}, 0.5f, 1);
+ OperandType type0(Type::TENSOR_QUANT8_ASYMM, {4}, 0.5f, 1);
// Phase 1, operands
auto op1 = model->addOperand(&type0);
auto op2 = model->addOperand(&type1);
void CreateModel(Model *model) {
OperandType type2(Type::INT32, {});
OperandType type1(Type::TENSOR_INT32, {2});
- OperandType type3(Type::TENSOR_QUANT8_ASYMM, {2,4});
- OperandType type0(Type::TENSOR_QUANT8_ASYMM, {3,4});
+ OperandType type3(Type::TENSOR_QUANT8_ASYMM, {2,4}, 0.5f, 1);
+ OperandType type0(Type::TENSOR_QUANT8_ASYMM, {3,4}, 0.5f, 1);
// Phase 1, operands
auto op1 = model->addOperand(&type0);
auto op2 = model->addOperand(&type1);
GeneratedTests.transpose_float_1
GeneratedTests.transpose
GeneratedTests.transpose_quant8_1
+GeneratedTests.gather_1D_quant8
+GeneratedTests.gather_2D_quant8
GeneratedTests.transpose_float_1
GeneratedTests.transpose
GeneratedTests.transpose_quant8_1
+GeneratedTests.gather_1D_quant8
+GeneratedTests.gather_2D_quant8
ValidationTestCompilation.*
ValidationTestIdentify.*
ValidationTestExecution.*
+GeneratedTests.gather_1D_quant8
+GeneratedTests.gather_2D_quant8
# model
model = Model()
-i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{4}") # a vector of 2 float32s
+i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{4}, 0.5f, 1") # a vector of 2 float32s
i2 = Input("op2", "TENSOR_INT32", "{2}") # another vector of 2 int32s
axis = Int32Scalar("axis", 0)
-i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{2}")
+i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{2}, 0.5f, 1")
model = model.Operation("GATHER_EX", i1, i2, axis).To(i3)
# Example 1. Input in operand 0,
input0 = {i1: # input 0
- [3, 4, 5, 6],
+ [7, 9, 11, 13],
i2: # input 1
[2, 0]}
output0 = {i3: # output 0
- [5, 3]}
+ [11, 7]}
# Instantiate an example
Example((input0, output0))
# model
model = Model()
-i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{3,4}") # a vector of 2 float32s
+i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{3,4}, 0.5f, 1") # a vector of 2 float32s
i2 = Input("op2", "TENSOR_INT32", "{2}") # another vector of 2 int32s
axis = Int32Scalar("axis", 0)
-i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{2,4}")
+i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{2,4}, 0.5f, 1")
model = model.Operation("GATHER_EX", i1, i2, axis).To(i3)
# Example 1. Input in operand 0,
input0 = {i1: # input 0
- [3, 4, 5, 6,
- 7, 8, 9, 1,
- 2, 18, 19, 11],
+ [7, 9, 11, 13,
+ 15, 17, 19, 3,
+ 5, 37, 39, 23],
i2: # input 1
[2, 0]}
output0 = {i3: # output 0
- [2, 18, 19, 11,
- 3, 4, 5, 6]}
+ [5, 37, 39, 23,
+ 7, 9, 11, 13]}
# Instantiate an example
Example((input0, output0))