• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2020 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <iostream>
18 #include <memory>
19 #include "common/common_test.h"
20 
21 #ifdef OPEN_SOURCE
22 #include "ge/client/ge_api.h"
23 #else
24 #include "external/ge/ge_api.h"
25 #endif
26 
27 #define private public
28 #include "transform/graph_ir/graph_builder.h"
29 #include "transform/graph_ir/df_graph_manager.h"
30 
31 using UT::Common;
32 
33 namespace mindspore {
34 namespace transform {
35 
36 class TestDfGraphBuilder : public UT::Common {
37  public:
TestDfGraphBuilder()38   TestDfGraphBuilder() {}
39   void SetUp();
40   void TearDown();
41 };
42 
SetUp()43 void TestDfGraphBuilder::SetUp() {}
44 
TearDown()45 void TestDfGraphBuilder::TearDown() {}
46 
TEST_F(TestDfGraphBuilder,TestBuildDatasetGraph)47 TEST_F(TestDfGraphBuilder, TestBuildDatasetGraph) {
48   DatasetGraphParam param4("queue_name", 1, 32, {0, 3}, {{32, 224, 224, 3}, {32}}, {});
49   ASSERT_EQ(transform::SUCCESS, BuildDatasetGraph(param4));
50   DfGraphManager::GetInstance().ClearGraph();
51 }
52 
53 }  // namespace transform
54 }  // namespace mindspore
55