Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
27ce7250
Unverified
Commit
27ce7250
authored
Oct 25, 2019
by
Scott Cyphers
Committed by
GitHub
Oct 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add nodes we've already seen to the to-do list (#3807)
parent
1e2a3f34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
node.cpp
src/ngraph/node.cpp
+1
-1
provenance.cpp
test/provenance.cpp
+31
-0
No files found.
src/ngraph/node.cpp
View file @
27ce7250
...
...
@@ -389,7 +389,7 @@ shared_ptr<Node> Node::add_provenance_group_members_above(const OutputVector& ba
add_provenance_group_member
(
node
->
shared_from_this
());
for
(
auto
value
:
node
->
input_values
())
{
if
(
0
==
node
->
m_provenance_group
.
count
(
value
.
get_node_shared_ptr
())
)
if
(
m_provenance_group
.
count
(
value
.
get_node_shared_ptr
())
==
0
)
{
todo
.
push_back
(
value
.
get_node
());
}
...
...
test/provenance.cpp
View file @
27ce7250
...
...
@@ -441,3 +441,34 @@ TEST(provenance, empty_group)
}
}
}
TEST
(
provenance
,
scaled_quantize_concat_unsigned
)
{
ngraph
::
Shape
shape_a
{
2
,
2
};
auto
A
=
make_shared
<
ngraph
::
op
::
Parameter
>
(
ngraph
::
element
::
u8
,
shape_a
);
auto
An
=
make_shared
<
ngraph
::
op
::
Parameter
>
(
ngraph
::
element
::
f32
,
ngraph
::
Shape
{
1
});
auto
Ax
=
make_shared
<
ngraph
::
op
::
Parameter
>
(
ngraph
::
element
::
f32
,
ngraph
::
Shape
{
1
});
A
->
add_provenance_tag
(
"in0"
);
An
->
add_provenance_tag
(
"in1"
);
Ax
->
add_provenance_tag
(
"in2"
);
ngraph
::
Shape
shape_r
{
2
,
2
};
auto
QConcat
=
ngraph
::
builder
::
QuantizedConcatBuilder
(
ngraph
::
NodeVector
{
A
},
0
,
ngraph
::
NodeVector
{
An
},
ngraph
::
NodeVector
{
Ax
});
auto
f
=
make_shared
<
ngraph
::
Function
>
(
ngraph
::
NodeVector
{
QConcat
},
ngraph
::
ParameterVector
{
A
,
An
,
Ax
});
QConcat
->
add_provenance_tag
(
"hello"
);
auto
check_if_result
=
[](
shared_ptr
<
Node
>
n
)
{
// Pointer will cast to nullptr if this node is not a Result
auto
ng_node
=
dynamic_pointer_cast
<
op
::
Result
>
(
n
);
bool
is_result
=
(
ng_node
!=
nullptr
);
return
is_result
;
};
for
(
auto
n
:
f
->
get_ordered_ops
())
{
if
(
!
check_if_result
(
n
))
{
ASSERT_EQ
(
n
->
get_provenance_tags
().
size
(),
1
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment