Skip to content
Snippets Groups Projects
Commit c090d609 authored by Wissam Boussella's avatar Wissam Boussella
Browse files

[Upd] Add pybind recipes for constant of shape and debug log for node_export.py

parent 8833a2bd
No related branches found
No related tags found
1 merge request!289[Fix] Checking nullptr on Node.cpp and ConstantFolding.cpp
......@@ -402,7 +402,12 @@ class ExportNodeCpp(ExportNode):
)
kernel_include_list.append(
self.kernels_path + "/" + kernel_path.stem + kernel_path.suffix)
if kernel_path.suffix is ["h", "hpp"]:
kernel_include_list.append(
self.kernels_path + "/" + kernel_path.stem + kernel_path.suffix)
else : aidge_core.Log.debug(f"Did not copy {kernel_path.stem} because suffix is {kernel_path.suffix}, which is not 'h' or 'hpp'.")
if self.config_template != "":
path_to_definition = f"{self.config_path}/{self.attributes['name']}.{self.config_extension}"
......
......@@ -24,7 +24,11 @@ namespace py = pybind11;
namespace Aidge {
void init_Recipes(py::module &m)
{
m.def("constant_folding", static_cast<void(*)(std::shared_ptr<GraphView>)>(constantFolding), py::arg("graph_view"), R"mydelimiter(
Recipe to optimize a computational graph by repeatedly identifying nodes with constant inputs, executes them immediately, and replaces them with pre-computed constant.
:param graph_view: Graph view on which we want to apply the recipe
:type graph_view: :py:class:`aidge_core.GraphView`
)mydelimiter");
m.def("matmul_to_fc", static_cast<void(*)(std::shared_ptr<GraphView>)>(matMulToFC), py::arg("graph_view"), R"mydelimiter(
Recipe to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
......
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