ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Verifier.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
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#ifndef __ONERT_GRAPH_VERIFIER_VERIFIER_H__
18#define __ONERT_GRAPH_VERIFIER_VERIFIER_H__
19
21
22namespace onert
23{
24namespace ir
25{
26class Graph;
27} // namespace ir
28} // namespace onert
29
30namespace onert
31{
32namespace ir
33{
34namespace verifier
35{
36
38{
39 virtual ~IVerifier() = default;
40 virtual bool verify(const Graph &graph) const noexcept = 0;
41};
42
43} // namespace verifier
44} // namespace ir
45} // namespace onert
46
47namespace onert
48{
49namespace ir
50{
51namespace verifier
52{
53
54class DAGChecker : public IVerifier
55{
56public:
57 bool verify(const Graph &graph) const noexcept override;
58 bool verify(const train::UseDefChains &training_defuses) const noexcept;
59};
60
61class EdgeChecker : public IVerifier
62{
63public:
64 bool verify(const Graph &graph) const noexcept override;
65 bool verify(const train::UseDefChains &training_defuses) const noexcept;
66};
67
72{
73public:
74 bool verify(const Graph &graph) const noexcept override;
75};
76
77} // namespace verifier
78} // namespace ir
79} // namespace onert
80
81#endif // __ONERT_GRAPH_VERIFIER_VERIFIER_H__
bool verify(const Graph &graph) const noexcept override
Definition Verifier.cc:92
bool verify(const Graph &graph) const noexcept override
Definition Verifier.cc:172
Check model input and output operands are really exist in the graph.
Definition Verifier.h:72
bool verify(const Graph &graph) const noexcept override
Definition Verifier.cc:225
std::unordered_map< TrainingOperandIndex, UseDefChain > UseDefChains
virtual bool verify(const Graph &graph) const noexcept=0
virtual ~IVerifier()=default