Skip to content
Snippets Groups Projects
Commit 006e8f4b authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Add python binding for WeightInterleaving Operator

parent 15bbe6ea
No related branches found
No related tags found
2 merge requests!318[Upd] release verision 0.5.0,!262Low bit support for ARM Cortex-M export
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#include <pybind11/pybind11.h>
#include "aidge/operator/WeightInterleaving.hpp"
namespace py = pybind11;
namespace Aidge {
void declare_WeightInterleaving(py::module &m) {
py::class_<WeightInterleaving_Op, std::shared_ptr<WeightInterleaving_Op>, OperatorTensor>(m, "WeightInterleavingOp", py::multiple_inheritance())
.def(py::init<>())
.def_static("get_inputs_name", &WeightInterleaving_Op::getInputsName)
.def_static("get_outputs_name", &WeightInterleaving_Op::getOutputsName)
.def_readonly_static("Type", &WeightInterleaving_Op::Type)
.def("__repr__", [](WeightInterleaving_Op& b) {
return fmt::format("Operator(type='{}')", b.Type);
});
declare_registrable<WeightInterleaving_Op>(m, "WeightInterleavingOp");
m.def("WeightInterleaving", &WeightInterleaving, py::arg("name") = "");
}
void init_WeightInterleaving(py::module &m) {
declare_WeightInterleaving(m);
}
} // namespace Aidge
......@@ -83,6 +83,7 @@ void init_Sub(py::module&);
void init_Tanh(py::module&);
void init_Transpose(py::module&);
void init_Unsqueeze(py::module&);
void init_WeightInterleaving(py::module&);
void init_Node(py::module&);
void init_GraphView(py::module&);
......@@ -177,6 +178,7 @@ void init_Aidge(py::module& m) {
init_Tanh(m);
init_Transpose(m);
init_Unsqueeze(m);
init_WeightInterleaving(m);
init_Producer(m);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment