diff --git a/aidge_core/export_utils/node_export.py b/aidge_core/export_utils/node_export.py index 5777814a0b10c49d0f75245bdc4e9681027bdfb8..c67dc00d357eea069bf3c25a92f4109705195ada 100644 --- a/aidge_core/export_utils/node_export.py +++ b/aidge_core/export_utils/node_export.py @@ -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}" diff --git a/python_binding/recipes/pybind_Recipes.cpp b/python_binding/recipes/pybind_Recipes.cpp index f656af70dfa05678875afd4b4748f358437852a8..053a699c5d0fd325c2e59a4f34e068f8facb5bbc 100644 --- a/python_binding/recipes/pybind_Recipes.cpp +++ b/python_binding/recipes/pybind_Recipes.cpp @@ -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.