Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
8c1231e8
Commit
8c1231e8
authored
Mar 05, 2019
by
Paul
Browse files
Formatting
parent
3b800ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/schedule.cpp
src/schedule.cpp
+6
-5
No files found.
src/schedule.cpp
View file @
8c1231e8
...
...
@@ -57,7 +57,7 @@ struct stream_info
void
assign_streams
(
program
&
p
,
std
::
size_t
streams
)
{
const
std
::
size_t
min_partition_threshold
=
2
;
for
(
std
::
size_t
stream
=
0
;
stream
<
streams
-
1
;
stream
++
)
for
(
std
::
size_t
stream
=
0
;
stream
<
streams
-
1
;
stream
++
)
{
fix
([
&
](
auto
self
,
auto
ins
)
{
// If weight is zero then stop
...
...
@@ -98,10 +98,10 @@ struct stream_info
}
}
void
set_stream
(
instruction_ref
ins
,
std
::
size_t
n
)
void
set_stream
(
instruction_ref
ins
,
std
::
size_t
n
)
{
assert
(
iweights
[
ins
]
>
0
);
ins2stream
[
ins
]
=
n
;
assert
(
iweights
[
ins
]
>
0
);
ins2stream
[
ins
]
=
n
;
}
std
::
size_t
get_stream
(
instruction_ref
ins
)
const
{
return
ins2stream
.
at
(
ins
);
}
...
...
@@ -244,7 +244,8 @@ void schedule::apply(program& p) const
fix
([
&
](
auto
self
,
auto
ins
)
{
auto
args
=
ins
->
inputs
();
std
::
sort
(
args
.
begin
(),
args
.
end
(),
[
&
](
auto
x
,
auto
y
)
{
return
std
::
make_tuple
(
si
.
weights
[
x
],
x
->
inputs
().
size
())
<
std
::
make_tuple
(
si
.
weights
[
y
],
y
->
inputs
().
size
());
return
std
::
make_tuple
(
si
.
weights
[
x
],
x
->
inputs
().
size
())
<
std
::
make_tuple
(
si
.
weights
[
y
],
y
->
inputs
().
size
());
});
for
(
auto
i
:
args
)
{
...
...
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