Home
last modified time | relevance | path

Searched refs:meta_graph (Results 1 – 25 of 66) sorted by relevance

123

/third_party/mindspore/mindspore/lite/test/ut/tools/converter/parser/tflite/
Dtflite_arithmetic_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./add.tflite", ""); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_AddFusion) << "w… in TEST_F()
38 void SetUp() override { meta_graph = LoadAndConvert("./sub.tflite", ""); } in SetUp()
42 ASSERT_NE(meta_graph, nullptr); in TEST_F()
43 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
44 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
45 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_SubFusion) << "w… in TEST_F()
[all …]
Dtflite_activation_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./relu.tflite", ""); } in SetUp()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Activation) << "… in TEST_F()
35 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsActivation(), nullptr); in TEST_F()
36 auto val = meta_graph->nodes.front()->primitive->value.AsActivation(); in TEST_F()
43 void SetUp() override { meta_graph = LoadAndConvert("./relu6.tflite", ""); } in SetUp()
47 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
48 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
49 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Activation) << "… in TEST_F()
[all …]
Dtflite_reduce_parser_test.cc24 void SetUp() override { meta_graph = LoadAndConvert("./reduce_max.tflite"); } in SetUp()
28 ASSERT_NE(meta_graph, nullptr); in TEST_F()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_ReduceFusion) <<… in TEST_F()
35 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsReduceFusion(), nullptr); in TEST_F()
36 auto val = meta_graph->nodes.front()->primitive->value.AsReduceFusion(); in TEST_F()
44 void SetUp() override { meta_graph = LoadAndConvert("./reduce_min.tflite"); } in SetUp()
48 ASSERT_NE(meta_graph, nullptr); in TEST_F()
49 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
[all …]
Dtflite_logical_parser_test.cc24 void SetUp() override { meta_graph = LoadAndConvert("./logical_and.tflite", ""); } in SetUp()
28 ASSERT_NE(meta_graph, nullptr); in TEST_F()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_LogicalAnd) << "… in TEST_F()
37 void SetUp() override { meta_graph = LoadAndConvert("./logical_not.tflite", ""); } in SetUp()
41 ASSERT_NE(meta_graph, nullptr); in TEST_F()
42 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
43 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
44 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_LogicalNot) << "… in TEST_F()
[all …]
Dtflite_resize_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./resize_nearest_neighbor.tflite", ""); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Resize) << "wron… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsResize(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsResize(); in TEST_F()
48 void SetUp() override { meta_graph = LoadAndConvert("./resize_bilinear.tflite", ""); } in SetUp()
52 ASSERT_NE(meta_graph, nullptr); in TEST_F()
53 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
[all …]
Dtflite_pooling_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./max_pooling.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_MaxPoolFusion) <… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsMaxPoolFusion(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsMaxPoolFusion(); in TEST_F()
50 void SetUp() override { meta_graph = LoadAndConvert("./avg_pooling.tflite"); } in SetUp()
54 ASSERT_NE(meta_graph, nullptr); in TEST_F()
55 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
[all …]
Dtflite_depthwise_conv_parser_test.cc24 void SetUp() override { meta_graph = LoadAndConvert("./depthwise_conv1.tflite", ""); } in SetUp()
28 ASSERT_NE(meta_graph, nullptr); in TEST_F()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Conv2DFusion) <<… in TEST_F()
35 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsConv2DFusion(), nullptr); in TEST_F()
36 auto val = meta_graph->nodes.front()->primitive->value.AsConv2DFusion(); in TEST_F()
52 void SetUp() override { meta_graph = LoadAndConvert("./depthwise_conv2.tflite", ""); } in SetUp()
56 ASSERT_NE(meta_graph, nullptr); in TEST_F()
57 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
[all …]
Dtflite_one_hot_parser_test.cc24 void SetUp() override { meta_graph = LoadAndConvert("./one_hot.tflite"); } in SetUp()
28 ASSERT_NE(meta_graph, nullptr); in TEST_F()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_OneHot) << "wron… in TEST_F()
35 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsOneHot(), nullptr); in TEST_F()
36 auto val = meta_graph->nodes.front()->primitive->value.AsOneHot(); in TEST_F()
Dtflite_softmax_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./softmax.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Softmax) << "wro… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsSoftmax(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsSoftmax(); in TEST_F()
Dtflite_topk_v2_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./topk_v2.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_TopKFusion) << "… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsTopKFusion(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsTopKFusion(); in TEST_F()
Dtflite_concat_parser_test.cc24 void SetUp() override { meta_graph = LoadAndConvert("./concat.tflite", ""); } in SetUp()
28 ASSERT_NE(meta_graph, nullptr); in TEST_F()
29 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
30 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
31 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Concat) << "wron… in TEST_F()
35 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsConcat(), nullptr); in TEST_F()
36 auto val = meta_graph->nodes.front()->primitive->value.AsConcat(); in TEST_F()
Dtflite_reverse_sequence_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./reverse_sequence.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_ReverseSequence)… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsReverseSequence(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsReverseSequence(); in TEST_F()
Dtflite_stack_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./stack.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Stack) << "wrong… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsStack(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsStack(); in TEST_F()
Dtflite_unstack_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./unstack.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_Unstack) << "wro… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsUnstack(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsUnstack(); in TEST_F()
Dtflite_strided_slice_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./strided_slice.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_StridedSlice) <<… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsStridedSlice(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsStridedSlice(); in TEST_F()
Dtflite_tile_parser_test.cc25 void SetUp() override { meta_graph = LoadAndConvert("./tile.tflite"); } in SetUp()
29 ASSERT_NE(meta_graph, nullptr); in TEST_F()
30 ASSERT_GT(meta_graph->nodes.size(), 0); in TEST_F()
31 ASSERT_NE(meta_graph->nodes.front()->primitive.get(), nullptr); in TEST_F()
32 …ASSERT_EQ(meta_graph->nodes.front()->primitive->value.type, schema::PrimitiveType_TileFusion) << "… in TEST_F()
36 ASSERT_NE(meta_graph->nodes.front()->primitive->value.AsTileFusion(), nullptr); in TEST_F()
37 auto val = meta_graph->nodes.front()->primitive->value.AsTileFusion(); in TEST_F()
/third_party/mindspore/mindspore/lite/src/
Dlite_model.h64 bool ConvertNodes(const T &meta_graph) { in ConvertNodes() argument
65 if (meta_graph.nodes() == nullptr) { in ConvertNodes()
69 for (size_t i = 0; i < meta_graph.nodes()->size(); ++i) { in ConvertNodes()
75 auto c_node = meta_graph.nodes()->template GetAs<U>(i); in ConvertNodes()
141 bool ConvertTensors(const T &meta_graph) { in ConvertTensors() argument
142 if (meta_graph.allTensors() == nullptr) { in ConvertTensors()
146 auto tensor_count = meta_graph.allTensors()->size(); in ConvertTensors()
148 auto *tensor = meta_graph.allTensors()->template GetAs<schema::Tensor>(i); in ConvertTensors()
159 int MetaGraphMappingSubGraph(const T &meta_graph) { in MetaGraphMappingSubGraph() argument
160 …if (meta_graph.inputIndex() == nullptr || meta_graph.outputIndex() == nullptr || meta_graph.nodes(… in MetaGraphMappingSubGraph()
[all …]
/third_party/mindspore/mindspore/lite/test/ut/tools/optimizer/fusion/
Dconstant_folding_fusion_test.cc41 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildGraph() local
42 meta_graph->name = "graph"; in BuildGraph()
51 meta_graph->nodes.emplace_back(std::move(example_node)); in BuildGraph()
53 meta_graph->inputIndex = {0, 1}; in BuildGraph()
54 meta_graph->outputIndex = {2}; in BuildGraph()
70 meta_graph->allTensors.emplace_back(std::move(input0)); in BuildGraph()
86 meta_graph->allTensors.emplace_back(std::move(input1)); in BuildGraph()
94 meta_graph->allTensors.emplace_back(std::move(add_output)); in BuildGraph()
96 return meta_graph; in BuildGraph()
100 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildGraphForOneInput() local
[all …]
Dconv_bn_fusion_test.cc75 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildCaffeGraph() local
76 meta_graph->name = "graph"; in BuildCaffeGraph()
85 meta_graph->nodes.emplace_back(std::move(convNode)); in BuildCaffeGraph()
96 meta_graph->nodes.emplace_back(std::move(bn_node)); in BuildCaffeGraph()
105 meta_graph->allTensors.emplace_back(std::move(input0)); in BuildCaffeGraph()
114 meta_graph->allTensors.emplace_back(std::move(input1)); in BuildCaffeGraph()
122 meta_graph->allTensors.emplace_back(std::move(conv_output)); in BuildCaffeGraph()
131 meta_graph->allTensors.emplace_back(std::move(input2)); in BuildCaffeGraph()
140 meta_graph->allTensors.emplace_back(std::move(input3)); in BuildCaffeGraph()
148 meta_graph->allTensors.emplace_back(std::move(output)); in BuildCaffeGraph()
[all …]
Dconv_scale_fusion_test.cc86 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildGraph() local
87 meta_graph->name = "graph"; in BuildGraph()
96 meta_graph->nodes.emplace_back(std::move(convNode)); in BuildGraph()
113 meta_graph->nodes.emplace_back(std::move(scale_node)); in BuildGraph()
122 meta_graph->allTensors.emplace_back(std::move(input0)); in BuildGraph()
131 meta_graph->allTensors.emplace_back(std::move(input1)); in BuildGraph()
141 meta_graph->allTensors.emplace_back(std::move(input00)); in BuildGraph()
150 meta_graph->allTensors.emplace_back(std::move(conv_output)); in BuildGraph()
159 meta_graph->allTensors.emplace_back(std::move(input2)); in BuildGraph()
168 meta_graph->allTensors.emplace_back(std::move(input3)); in BuildGraph()
[all …]
Dconv_biasadd_fusion_test.cc74 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildGraph() local
75 meta_graph->name = "graph"; in BuildGraph()
84 meta_graph->nodes.emplace_back(std::move(convNode)); in BuildGraph()
95 meta_graph->nodes.emplace_back(std::move(biasadd_node)); in BuildGraph()
97 meta_graph->inputIndex = {0}; in BuildGraph()
98 meta_graph->outputIndex = {4}; in BuildGraph()
107 meta_graph->allTensors.emplace_back(std::move(input0)); in BuildGraph()
116 meta_graph->allTensors.emplace_back(std::move(input1)); in BuildGraph()
124 meta_graph->allTensors.emplace_back(std::move(conv_output)); in BuildGraph()
133 meta_graph->allTensors.emplace_back(std::move(input2)); in BuildGraph()
[all …]
Dconv_activation_fusion_test.cc74 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in BuildGraph() local
75 meta_graph->name = "graph"; in BuildGraph()
83 meta_graph->nodes.emplace_back(std::move(convNode)); in BuildGraph()
95 meta_graph->nodes.emplace_back(std::move(next_node)); in BuildGraph()
97 meta_graph->inputIndex = {0}; in BuildGraph()
98 meta_graph->outputIndex = {3}; in BuildGraph()
107 meta_graph->allTensors.emplace_back(std::move(input0)); in BuildGraph()
116 meta_graph->allTensors.emplace_back(std::move(input1)); in BuildGraph()
124 meta_graph->allTensors.emplace_back(std::move(conv_output)); in BuildGraph()
132 meta_graph->allTensors.emplace_back(std::move(output)); in BuildGraph()
[all …]
/third_party/mindspore/mindspore/lite/test/ut/src/
Dscheduler_test.cc37 auto meta_graph = std::make_shared<mindspore::schema::MetaGraphT>(); in TEST_F() local
38 meta_graph->name = "graph"; in TEST_F()
39 meta_graph->version = mindspore::lite::Version(); in TEST_F()
147 meta_graph->nodes.emplace_back(std::move(split)); in TEST_F()
148 meta_graph->nodes.emplace_back(std::move(abs1)); in TEST_F()
149 meta_graph->nodes.emplace_back(std::move(cons1)); in TEST_F()
150 meta_graph->nodes.emplace_back(std::move(abs2)); in TEST_F()
151 meta_graph->nodes.emplace_back(std::move(cons2)); in TEST_F()
152 meta_graph->nodes.emplace_back(std::move(concat)); in TEST_F()
153 meta_graph->allTensors.emplace_back(std::move(tensor0)); in TEST_F()
[all …]
/third_party/mindspore/mindspore/lite/test/st/
Dsub_graph_test.cc38 auto meta_graph = std::make_shared<schema::MetaGraphT>(); in TEST_F() local
39 meta_graph->allTensors.resize(16); in TEST_F()
69 meta_graph->nodes.emplace_back(std::move(add_0)); in TEST_F()
70 meta_graph->allTensors[0] = std::move(tensor_0); in TEST_F()
71 meta_graph->allTensors[1] = std::move(tensor_1); in TEST_F()
72 meta_graph->allTensors[2] = std::move(tensor_2); in TEST_F()
97 meta_graph->nodes.emplace_back(std::move(add_1)); in TEST_F()
98 meta_graph->allTensors[3] = std::move(tensor_3); in TEST_F()
99 meta_graph->allTensors[4] = std::move(tensor_4); in TEST_F()
111 meta_graph->nodes.emplace_back(std::move(partial_cond)); in TEST_F()
[all …]
Dmultiple_device_test.cc40 void CreateMultyModel1(mindspore::schema::MetaGraphT *meta_graph) { in CreateMultyModel1() argument
41 meta_graph->name = "graph"; in CreateMultyModel1()
42 meta_graph->version = mindspore::lite::Version(); in CreateMultyModel1()
148 meta_graph->nodes.emplace_back(std::move(cos)); in CreateMultyModel1()
149 meta_graph->nodes.emplace_back(std::move(exp)); in CreateMultyModel1()
150 meta_graph->nodes.emplace_back(std::move(where)); in CreateMultyModel1()
151 meta_graph->nodes.emplace_back(std::move(sin)); in CreateMultyModel1()
153 meta_graph->allTensors.emplace_back(std::move(tensor0)); in CreateMultyModel1()
154 meta_graph->allTensors.emplace_back(std::move(tensor1)); in CreateMultyModel1()
155 meta_graph->allTensors.emplace_back(std::move(tensor2)); in CreateMultyModel1()
[all …]

123