ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Backend.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 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_BACKEND_BACKEND_H__
18#define __ONERT_BACKEND_BACKEND_H__
19
20#include <memory>
21
22#include "ir/Graph.h"
23#include "backend/IConfig.h"
26
27namespace onert::backend
28{
29
30namespace custom
31{
32class IKernelBuilder;
33}
34
36{
37public:
38 virtual ~Backend() = default;
39 virtual std::shared_ptr<onert::backend::IConfig> config() const = 0;
40
41 virtual std::unique_ptr<BackendContext> newContext(ContextData &&) const = 0;
42
43 virtual std::unique_ptr<ValidatorBase> validator(const ir::Graph &graph) const
44 {
45 return std::make_unique<ValidatorBase>(graph);
46 }
47};
48
49} // namespace onert::backend
50
51#endif // __ONERT_BACKEND_BACKEND_H__
virtual std::unique_ptr< ValidatorBase > validator(const ir::Graph &graph) const
Definition Backend.h:43
virtual std::shared_ptr< onert::backend::IConfig > config() const =0
virtual ~Backend()=default
virtual std::unique_ptr< BackendContext > newContext(ContextData &&) const =0