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
458ec149
Commit
458ec149
authored
Mar 26, 2019
by
Paul
Browse files
Add an env var to enable the scheduler
parent
8b6a5cda
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
src/include/migraphx/schedule.hpp
src/include/migraphx/schedule.hpp
+1
-0
src/schedule.cpp
src/schedule.cpp
+2
-0
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+3
-1
No files found.
src/include/migraphx/schedule.hpp
View file @
458ec149
...
...
@@ -17,6 +17,7 @@ struct program;
struct
schedule
{
schedule_model
model
{};
bool
enable
=
true
;
std
::
string
name
()
const
{
return
"schedule"
;
}
void
apply
(
program
&
p
)
const
;
};
...
...
src/schedule.cpp
View file @
458ec149
...
...
@@ -341,6 +341,8 @@ struct stream_info
void
schedule
::
apply
(
program
&
p
)
const
{
if
(
not
enable
)
return
;
stream_info
si
;
auto
last
=
std
::
prev
(
p
.
end
());
si
.
accumulate_weights
(
last
,
model
);
...
...
src/targets/gpu/target.cpp
View file @
458ec149
...
...
@@ -25,6 +25,8 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_ENABLE_SCHEDULE_PASS
)
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
gctx
)
const
{
auto
&
ctx
=
any_cast
<
context
>
(
gctx
);
...
...
@@ -53,7 +55,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
fuse_ops
{
&
ctx
},
dead_code_elimination
{},
write_literals
{
&
ctx
},
schedule
{
gpu
::
schedule_model
{
ctx
.
get_current_device
().
nstreams
()}},
schedule
{
gpu
::
schedule_model
{
ctx
.
get_current_device
().
nstreams
()}
,
enabled
(
MIGRAPHX_ENABLE_SCHEDULE_PASS
{})
},
memory_coloring
{
"hip::allocate"
},
dead_code_elimination
{},
eliminate_workspace
{},
...
...
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