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
b3de1cfa
Commit
b3de1cfa
authored
Mar 27, 2019
by
Khalique
Browse files
Merge branch 'develop' of
https://github.com/ROCmSoftwarePlatform/AMDMIGraphX
into pad_op_rewrite
parents
95a5ba16
db70de8e
Changes
3
Hide 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 @
b3de1cfa
...
@@ -17,6 +17,7 @@ struct program;
...
@@ -17,6 +17,7 @@ struct program;
struct
schedule
struct
schedule
{
{
schedule_model
model
{};
schedule_model
model
{};
bool
enable
=
true
;
std
::
string
name
()
const
{
return
"schedule"
;
}
std
::
string
name
()
const
{
return
"schedule"
;
}
void
apply
(
program
&
p
)
const
;
void
apply
(
program
&
p
)
const
;
};
};
...
...
src/schedule.cpp
View file @
b3de1cfa
...
@@ -341,6 +341,8 @@ struct stream_info
...
@@ -341,6 +341,8 @@ struct stream_info
void
schedule
::
apply
(
program
&
p
)
const
void
schedule
::
apply
(
program
&
p
)
const
{
{
if
(
not
enable
)
return
;
stream_info
si
;
stream_info
si
;
auto
last
=
std
::
prev
(
p
.
end
());
auto
last
=
std
::
prev
(
p
.
end
());
si
.
accumulate_weights
(
last
,
model
);
si
.
accumulate_weights
(
last
,
model
);
...
...
src/targets/gpu/target.cpp
View file @
b3de1cfa
...
@@ -27,6 +27,8 @@ namespace migraphx {
...
@@ -27,6 +27,8 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_ENABLE_SCHEDULE_PASS
)
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
gctx
)
const
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
gctx
)
const
{
{
auto
&
ctx
=
any_cast
<
context
>
(
gctx
);
auto
&
ctx
=
any_cast
<
context
>
(
gctx
);
...
@@ -58,7 +60,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
...
@@ -58,7 +60,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
fuse_ops
{
&
ctx
},
fuse_ops
{
&
ctx
},
dead_code_elimination
{},
dead_code_elimination
{},
write_literals
{
&
ctx
},
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"
},
memory_coloring
{
"hip::allocate"
},
dead_code_elimination
{},
dead_code_elimination
{},
eliminate_workspace
{},
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