Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cyril Moineau
aidge_core
Commits
de782ae3
Commit
de782ae3
authored
11 months ago
by
Vincent Templier
Browse files
Options
Downloads
Patches
Plain Diff
Add Python binding for Expand MetaOps recipe
parent
5bc18f79
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_binding/recipes/pybind_Recipes.cpp
+18
-14
18 additions, 14 deletions
python_binding/recipes/pybind_Recipes.cpp
with
18 additions
and
14 deletions
python_binding/recipes/pybind_Recipes.cpp
+
18
−
14
View file @
de782ae3
...
...
@@ -21,66 +21,70 @@
namespace
py
=
pybind11
;
namespace
Aidge
{
void
init_Recipes
(
py
::
module
&
m
)
{
void
init_Recipes
(
py
::
module
&
m
)
{
m
.
def
(
"fuse_mul_add"
,
static_cast
<
void
(
*
)(
std
::
shared_ptr
<
GraphView
>
)
>
(
fuseMulAdd
),
py
::
arg
(
"graph_view"
),
R"mydelimiter(
Recip
i
e to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
Recipe to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
:param graph_view: Graph view on which we want to apply the recip
i
e
:param graph_view: Graph view on which we want to apply the recipe
:type graph_view: :py:class:`aidge_core.GraphView`
)mydelimiter"
);
// m.def("fuse_mul_add", static_cast<void(*)(std::set<std::shared_ptr<Node>>)>(fuseMulAdd), py::arg("nodes"), R"mydelimiter(
//
R
ecip
i
e to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
//
r
ecipe to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
// :param nodes: The MatMul and Add nodes to fuse.
// :type nodes: list of :py:class:`aidge_core.Node`
// )mydelimiter");
m
.
def
(
"remove_dropout"
,
static_cast
<
void
(
*
)(
std
::
shared_ptr
<
GraphView
>
)
>
(
removeDropout
),
py
::
arg
(
"graph_view"
),
R"mydelimiter(
Recip
i
e to remove a dropout operator.
Recipe to remove a dropout operator.
:param graph_view: Graph view on which we want to apply the recip
i
e
:param graph_view: Graph view on which we want to apply the recipe
:type graph_view: :py:class:`aidge_core.GraphView`
)mydelimiter"
);
m
.
def
(
"remove_flatten"
,
static_cast
<
void
(
*
)(
std
::
shared_ptr
<
GraphView
>
)
>
(
removeFlatten
),
py
::
arg
(
"graph_view"
),
R"mydelimiter(
Recip
i
e to remove a flatten operator.
Recipe to remove a flatten operator.
:param graph_view: Graph view on which we want to apply the recip
i
e
:param graph_view: Graph view on which we want to apply the recipe
:type graph_view: :py:class:`aidge_core.GraphView`
)mydelimiter"
);
// m.def("remove_flatten", static_cast<void(*)(std::set<std::shared_ptr<Node>>)>(removeFlatten), py::arg("nodes"), R"mydelimiter(
// Recip
i
e to remove a flatten operator.
// Recipe to remove a flatten operator.
// :param nodes: The flatten operator to remove.
// :type nodes: list of :py:class:`aidge_core.Node`
// )mydelimiter");
// m.def("fuse_mul_add", static_cast<void(*)(std::set<std::shared_ptr<Node>>)>(fuseMulAdd), py::arg("nodes"), R"mydelimiter(
// Recip
i
e to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
// Recipe to Fuse MatMul and Add operators into an :py:class:`aidge_core.FC` operator.
// :param nodes: The MatMul and Add nodes to fuse.
// :type nodes: list of :py:class:`aidge_core.Node`
// )mydelimiter");
m
.
def
(
"fuse_batchnorm"
,
static_cast
<
void
(
*
)(
std
::
shared_ptr
<
GraphView
>
)
>
(
fuseBatchNorm
),
py
::
arg
(
"graph_view"
),
R"mydelimiter(
Recip
i
e to remove a flatten operator.
Recipe to remove a flatten operator.
:param graph_view: Graph view on which we want to apply the recip
i
e
:param graph_view: Graph view on which we want to apply the recipe
:type graph_view: :py:class:`aidge_core.GraphView`
)mydelimiter"
);
m
.
def
(
"get_conv_horizontal_tiling"
,
static_cast
<
std
::
set
<
std
::
shared_ptr
<
Node
>>
(
*
)(
const
std
::
shared_ptr
<
Node
>&
,
const
DimIdx_t
,
const
std
::
size_t
)
>
(
getConvHorizontalTiling
),
m
.
def
(
"get_conv_horizontal_tiling"
,
static_cast
<
std
::
set
<
std
::
shared_ptr
<
Node
>>
(
*
)(
const
std
::
shared_ptr
<
Node
>&
,
const
DimIdx_t
,
const
std
::
size_t
)
>
(
getConvHorizontalTiling
),
py
::
arg
(
"node"
),
py
::
arg
(
"axis"
),
py
::
arg
(
"nb_slices"
));
// m.def("fuse_batchnorm", static_cast<void(*)(std::set<std::shared_ptr<Node>>)>(fuseBatchNorm), py::arg("nodes"), R"mydelimiter(
//
R
ecip
i
e to remove a flatten operator.
//
r
ecipe to remove a flatten operator.
// :param nodes: The flatten operator to remove.
// :type nodes: list of :py:class:`aidge_core.Node`
// )mydelimiter");
m
.
def
(
"expand_metaops"
,
static_cast
<
void
(
*
)(
std
::
shared_ptr
<
GraphView
>
,
bool
)
>
(
expandMetaOps
),
py
::
arg
(
"graph_view"
),
py
::
arg
(
"recursive"
)
=
false
);
}
}
// namespace Aidge
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment