2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include "ir/LoweredGraph.h"
20 #ifndef __ONERT_DUMPER_DOT_DOT_DUMPER_H__
21 #define __ONERT_DUMPER_DOT_DOT_DUMPER_H__
35 OFF = 0, //< Do not dump
36 ALL_BUT_CONSTANTS = 1, //< Emit all operations and operands but constants
37 ALL = 2 //< Emit all operations and operands
41 DotDumper(const ir::Graph &graph, Level level)
42 : _lowered_graph{nullptr}, _graph(graph), _level{level}
45 DotDumper(const ir::LoweredGraph *lowered_graph, Level level)
46 : _lowered_graph{lowered_graph}, _graph(_lowered_graph->graph()), _level{level}
52 * @brief Dump to dot file as tag name if "GRAPH_DOT_DUMP" is set
54 * @param[in] tag The name of dot file that would be created
57 void dump(const std::string &tag);
60 const ir::LoweredGraph *_lowered_graph;
61 const ir::Graph &_graph;
69 #endif // __ONERT_DUMPER_DOT_DOT_DUMPER_H__