ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw_api_wrapper_pybind.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 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#include <pybind11/pybind11.h>
18
23
24using namespace onert::api::python;
25namespace py = pybind11;
26
27PYBIND11_MODULE(libnnfw_api_pybind, m)
28{
29 m.doc() = "Main module that contains infer and experimental submodules";
30
31 // Bind common `NNFW_SESSION` class
33
34 // Bind `NNFW_SESSION` class for inference
35 // Currently, the `infer` session is the same as common.
36 auto infer = m.def_submodule("infer", "Inference submodule");
37 infer.attr("nnfw_session") = m.attr("nnfw_session");
38
39 // Bind our NNFW-status exceptions
40 auto ex = m.def_submodule("exception", "NNFW-status Exception");
42
43 // Bind experimental `NNFW_SESSION` class
44 auto experimental = m.def_submodule("experimental", "Experimental submodule");
45 experimental.attr("nnfw_session") = m.attr("nnfw_session");
47
48 // Bind common `tensorinfo` class
50
51 // Bind enums
53
54 m.doc() = "NNFW Python Bindings for Training";
55
56 // Bind training enums
58
59 // Bind training nnfw_loss_info
61
62 // Bind_train_info
64}
Definition infer.py:1
void bind_nnfw_session(pybind11::module_ &m)
void bind_tensorinfo(pybind11::module_ &m)
void bind_experimental_nnfw_session(pybind11::module_ &m)
void bind_nnfw_enums(pybind11::module_ &m)
void bind_nnfw_exceptions(py::module_ &m)
PYBIND11_MODULE(libnnfw_api_pybind, m)
void bind_nnfw_train_enums(py::module_ &m)
void bind_nnfw_train_info(py::module_ &m)
void bind_nnfw_loss_info(py::module_ &m)