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
11a9f464
Unverified
Commit
11a9f464
authored
May 08, 2019
by
Scott Cyphers
Committed by
GitHub
May 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate #2889 from master (#2891)
parent
ecb1608b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
53 deletions
+0
-53
graph_util.cpp
src/ngraph/graph_util.cpp
+0
-9
provenance.cpp
test/provenance.cpp
+0
-44
No files found.
src/ngraph/graph_util.cpp
View file @
11a9f464
...
@@ -157,15 +157,6 @@ void ngraph::replace_node(std::shared_ptr<Node> target, std::shared_ptr<Node> re
...
@@ -157,15 +157,6 @@ void ngraph::replace_node(std::shared_ptr<Node> target, std::shared_ptr<Node> re
};
};
traverse_nodes
({
target
},
set_replacement_prov
,
false
,
replacement
->
get_arguments
());
traverse_nodes
({
target
},
set_replacement_prov
,
false
,
replacement
->
get_arguments
());
auto
propagate_replacement_prov
=
[
replacement
](
std
::
shared_ptr
<
Node
>
node
)
{
if
(
is_post_dominated
(
node
.
get
(),
replacement
.
get
()))
{
node
->
merge_provenance_tags_from
(
replacement
);
}
};
traverse_nodes
({
replacement
},
propagate_replacement_prov
,
false
);
}
}
// For each of target's output O with replacement output O_rep:
// For each of target's output O with replacement output O_rep:
...
...
test/provenance.cpp
View file @
11a9f464
...
@@ -209,48 +209,4 @@ TEST(provenance, provenance)
...
@@ -209,48 +209,4 @@ TEST(provenance, provenance)
EXPECT_EQ
(
d
->
get_provenance_tags
(),
(
ProvSet
{
"tag_a"
,
"tag_b"
,
"tag_c"
}));
EXPECT_EQ
(
d
->
get_provenance_tags
(),
(
ProvSet
{
"tag_a"
,
"tag_b"
,
"tag_c"
}));
}
}
//
// Before:
//
// A{tag_a} B{tag_b}
// | |
// C{tag_c}
//
// Replacement:
//
// D{}
// |
// C -> E{}
//
// After:
//
// D{tag_a,tag_b,tag_c}
// |
// E{tag_a,tag_b,tag_c}
//
// Comment:
// * E is the replacement root, and its insertion kills A, B, and C.
// * D is post-dominated by E, so the tags inherited by E should also be taken on by D.
//
{
auto
x
=
make_shared
<
op
::
Parameter
>
(
element
::
i32
,
PartialShape
{
2
,
3
,
4
});
auto
y
=
make_shared
<
op
::
Parameter
>
(
element
::
i32
,
PartialShape
{
2
,
3
,
4
});
auto
a
=
make_shared
<
op
::
Add
>
(
x
,
y
);
a
->
add_provenance_tag
(
"tag_a"
);
auto
b
=
make_shared
<
op
::
Multiply
>
(
y
,
x
);
b
->
add_provenance_tag
(
"tag_b"
);
auto
c
=
make_shared
<
op
::
Subtract
>
(
a
,
b
);
c
->
add_provenance_tag
(
"tag_c"
);
auto
f
=
make_shared
<
Function
>
(
c
,
ParameterVector
{
x
,
y
});
auto
d
=
make_zero
(
element
::
i32
,
Shape
{
2
,
3
,
4
});
auto
e
=
make_shared
<
op
::
Negative
>
(
d
);
replace_node
(
c
,
e
);
EXPECT_EQ
(
d
->
get_provenance_tags
(),
(
ProvSet
{
"tag_a"
,
"tag_b"
,
"tag_c"
}));
EXPECT_EQ
(
e
->
get_provenance_tags
(),
(
ProvSet
{
"tag_a"
,
"tag_b"
,
"tag_c"
}));
}
}
}
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