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
a6c9ad80
Commit
a6c9ad80
authored
Aug 14, 2019
by
Paul
Browse files
Propogate const for contiguous
parent
924d0f2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+7
-0
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+2
-0
No files found.
src/eliminate_contiguous.cpp
View file @
a6c9ad80
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
#include <migraphx/iterator_for.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/op/contiguous.hpp>
#include <migraphx/op/identity.hpp>
#include <utility>
#include <utility>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -82,6 +84,11 @@ void eliminate_contiguous::apply(program& p) const
...
@@ -82,6 +84,11 @@ void eliminate_contiguous::apply(program& p) const
{
{
instruction
::
replace_argument
(
ins
,
arg
,
prev
);
instruction
::
replace_argument
(
ins
,
arg
,
prev
);
}
}
else
if
(
prev
->
can_eval
())
{
auto
c
=
p
.
insert_instruction
(
arg
,
op
::
contiguous
{},
prev
);
p
.
replace_instruction
(
arg
,
op
::
identity
{},
c
);
}
}
}
}
}
}
}
...
...
src/targets/gpu/target.cpp
View file @
a6c9ad80
...
@@ -62,6 +62,8 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
...
@@ -62,6 +62,8 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
dead_code_elimination
{},
dead_code_elimination
{},
eliminate_contiguous
{},
eliminate_contiguous
{},
dead_code_elimination
{},
dead_code_elimination
{},
propagate_constant
{},
dead_code_elimination
{},
adjust_allocation
{},
adjust_allocation
{},
dead_code_elimination
{},
dead_code_elimination
{},
fuse_ops
{
&
ctx
},
fuse_ops
{
&
ctx
},
...
...
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