Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pybind_QuantQAT_LSQ.cpp 1.23 KiB
/********************************************************************************
 * 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 <pybind11/stl.h>

#include <string>

#include "aidge/QuantQAT_LSQ.hpp"

#include "aidge/hook/Hook.hpp"
#include "aidge/graph/GraphView.hpp"

namespace py = pybind11;

namespace Aidge {
void init_QuantQAT_LSQ(py::module &m) {
    auto mQuantLSQ = m.def_submodule("quant_lsq");
    mQuantLSQ.def("insert_act_quantizers", &QuantLSQ::insertActQuantizers, py::arg("graphView"), py::arg("nbBits"));
    mQuantLSQ.def("insert_param_quantizers", &QuantLSQ::insertParamQuantizers, py::arg("graphView"), py::arg("nbBits"));
    mQuantLSQ.def("update_first_and_last_param_quantizers", &QuantLSQ::updateFirstAndLastParamQuantizers, py::arg("graphView"), py::arg("nbBits"));
    mQuantLSQ.def("insert_quantizers", &QuantLSQ::insertQuantizers, py::arg("graphView"), py::arg("nbBits"));

}

} // namespace Aidge