Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210130121
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210130121
Commits
96dd134b
Commit
96dd134b
authored
5 years ago
by
jackalcooper
Committed by
Li Xinqi
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix keep header only (#2001)
* speedup compile time * fix keep header only
parent
1b13f7e4
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
oneflow/core/job_completer/add_keep_header_only_op_conf.cpp
+1
-1
1 addition, 1 deletion
oneflow/core/job_completer/add_keep_header_only_op_conf.cpp
oneflow/core/job_completer/autotick.cpp
+7
-8
7 additions, 8 deletions
oneflow/core/job_completer/autotick.cpp
with
8 additions
and
9 deletions
oneflow/core/job_completer/add_keep_header_only_op_conf.cpp
+
1
−
1
View file @
96dd134b
...
...
@@ -17,7 +17,7 @@ void AddKeepHeaderOnlyOp(const OpGraph& op_graph, Job* job) {
}
}
if
(
header_only_ibns
.
empty
())
{
return
;
}
CHECK
(
node
->
op
().
op_conf
().
has_tick_conf
()
==
false
);
auto
OpEdge4Lbi
=
[
node
](
const
LogicalBlobId
&
lbi
)
->
OpEdge
*
{
for
(
OpEdge
*
edge
:
node
->
in_edges
())
{
for
(
const
LogicalBlobId
&
edge_lbi
:
edge
->
lbis
())
{
...
...
This diff is collapsed.
Click to expand it.
oneflow/core/job_completer/autotick.cpp
+
7
−
8
View file @
96dd134b
...
...
@@ -116,6 +116,7 @@ OperatorConf AppendTick(const std::list<const OpNode*>& op_nodes, JobBuilder* jo
std
::
vector
<
std
::
string
>
op_names
;
std
::
vector
<
LogicalBlobId
>
lbis
;
for
(
const
auto
*
op_node
:
op_nodes
)
{
CHECK
(
op_node
->
op
().
op_conf
().
has_keep_header_only_conf
()
==
false
);
if
(
op_node
->
op
().
output_bns
().
empty
())
{
op_names
.
push_back
(
op_node
->
op
().
op_name
());
}
else
{
...
...
@@ -206,15 +207,13 @@ void ForEachInputCriticalSectionOpNodes(
Handler
)
{
HashMap
<
OperatorConf
::
OpTypeCase
,
HashSet
<
const
OpNode
*>>
op_type_case2op_nodes
;
InitOpTypeCase2OpNodes
(
op_graph
,
&
op_type_case2op_nodes
);
for
(
OperatorConf
::
OpTypeCase
op_type_case
:
{
OperatorConf
::
kVariableConf
,
OperatorConf
::
kInputConf
})
{
if
(
op_type_case2op_nodes
[
op_type_case
].
empty
())
{
continue
;
}
HashSet
<
const
OpNode
*>
op_nodes
=
op_type_case2op_nodes
[
op_type_case
];
for
(
const
OpNode
*
op_node
:
op_type_case2op_nodes
[
op_type_case
])
{
op_node
->
ForEachNodeOnOutEdge
([
&
](
OpNode
*
out_node
)
{
op_nodes
.
insert
(
out_node
);
});
}
Handler
(
op_nodes
,
GetOpNames
(
op_type_case2op_nodes
[
op_type_case
]));
OperatorConf
::
OpTypeCase
op_type_case
=
OperatorConf
::
kInputConf
;
if
(
op_type_case2op_nodes
[
op_type_case
].
empty
())
{
return
;
}
HashSet
<
const
OpNode
*>
op_nodes
=
op_type_case2op_nodes
[
op_type_case
];
for
(
const
OpNode
*
op_node
:
op_type_case2op_nodes
[
op_type_case
])
{
op_node
->
ForEachNodeOnOutEdge
([
&
](
OpNode
*
out_node
)
{
op_nodes
.
insert
(
out_node
);
});
}
Handler
(
op_nodes
,
GetOpNames
(
op_type_case2op_nodes
[
op_type_case
]));
}
void
ForEachOutputCriticalSectionOpNodes
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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