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
Iterations
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
Eclipse Projects
aidge
aidge_core
Commits
65650935
Commit
65650935
authored
5 months ago
by
Octave Perrin
Browse files
Options
Downloads
Patches
Plain Diff
more pybind
parent
7d66e68d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/aidge/graph/GraphView.hpp
+1
-1
1 addition, 1 deletion
include/aidge/graph/GraphView.hpp
python_binding/graph/pybind_GraphView.cpp
+20
-14
20 additions, 14 deletions
python_binding/graph/pybind_GraphView.cpp
with
21 additions
and
15 deletions
include/aidge/graph/GraphView.hpp
+
1
−
1
View file @
65650935
...
...
@@ -415,7 +415,7 @@ public:
* Get the nodes name according to the GraphView nodes ranking.
* @param format The formatting string to be used with fmt::format().
* @details The usable positional arguments are the following:
* {0} node name, {1} node type, {2} rank, {3} type rank
* {0} node name, {1} node type, {2} rank, {3} type rank
f
* @param markNonUnicity If true, non unique ranking is prefixed with "?"
* @return std::map<NodePtr, std::string> A map with the corresponding names
*/
...
...
This diff is collapsed.
Click to expand it.
python_binding/graph/pybind_GraphView.cpp
+
20
−
14
View file @
65650935
...
...
@@ -180,7 +180,15 @@ void init_GraphView(py::module& m) {
.
def
(
"set_backend"
,
&
GraphView
::
setBackend
,
py
::
arg
(
"backend"
),
py
::
arg
(
"device"
)
=
0
)
.
def
(
"get_ordered_nodes"
,
&
GraphView
::
getOrderedNodes
,
py
::
arg
(
"reversed"
)
=
false
,
R"mydelimiter(
Get ordered nodes for the graph view
Get a topological node order for an acyclic walk of the graph.
Graph cycles are broken on operator back edges such that resolution on
single level lattice can be done in a single pass as it is
the case generally for static resolution of Tensor shapes/datatypes.
:param reversed: if True, returns a topological order of the reversed graph
:type reversed: bool
:return: the ordered list of nodes
:rtype: List[Node]
)mydelimiter"
)
// .def("__getitem__", [](Tensor& b, size_t idx)-> py::object {
// // TODO : Should return error if backend not compatible with get
...
...
@@ -218,20 +226,18 @@ void init_GraphView(py::module& m) {
.
def
(
"get_ranked_nodes_name"
,
&
GraphView
::
getRankedNodesName
,
py
::
arg
(
"format"
),
py
::
arg
(
"mark_non_unicity"
)
=
true
,
R"mydelimiter(
//TODO
Get the nodes name according to the GraphView nodes ranking.
@param format The formatting string to be used with fmt::format().
@details The usable positional arguments are the following:
{0} node name, {1} node type, {2} rank, {3} type rank
@param markNonUnicity If true, non unique ranking is prefixed with "?"
@return std::map<NodePtr, std::string> A map with the corresponding names
*/
Get the nodes name according to the GraphView nodes ranking.
:param format: The formatting string to be used in the output f-string
The usable positional arguments are the following:
{0} node name, {1} node type, {2} rank, {3} type rank
:type format: string
:param markNonUnicity: If true, non unique ranking is prefixed with "?"
:type markNonUnicity: bool
:return: map(Node, string) A map with the corresponding names
)mydelimiter"
)
.
def
(
"set_dataformat"
,
&
GraphView
::
setDataFormat
,
py
::
arg
(
"dataformat"
))
;
.
def
(
"set_dataformat"
,
&
GraphView
::
setDataFormat
,
py
::
arg
(
"dataformat"
));
m
.
def
(
"get_connected_graph_view"
,
&
getConnectedGraphView
,
R"mydelimiter(
...
...
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