ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
22
23using namespace onert::api::python;
24
25PYBIND11_MODULE(libnnfw_api_pybind, m)
26{
27 m.doc() = "Main module that contains infer and experimental submodules";
28
29 // Bind common `NNFW_SESSION` class
31
32 // Bind `NNFW_SESSION` class for inference
33 // Currently, the `infer` session is the same as common.
34 auto infer = m.def_submodule("infer", "Inference submodule");
35 infer.attr("nnfw_session") = m.attr("nnfw_session");
36
37 // Bind experimental `NNFW_SESSION` class
38 auto experimental = m.def_submodule("experimental", "Experimental submodule");
39 experimental.attr("nnfw_session") = m.attr("nnfw_session");
41
42 // Bind common `tensorinfo` class
44
45 m.doc() = "NNFW Python Bindings for Training";
46
47 // Bind training enums
49
50 // Bind training nnfw_loss_info
52
53 // Bind_train_info
55}
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)
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)