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
b324b9ed
Commit
b324b9ed
authored
Aug 16, 2019
by
Paul
Browse files
Replace with literal
parent
d01a5086
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+5
-2
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+0
-2
No files found.
src/eliminate_contiguous.cpp
View file @
b324b9ed
...
@@ -86,8 +86,11 @@ void eliminate_contiguous::apply(program& p) const
...
@@ -86,8 +86,11 @@ void eliminate_contiguous::apply(program& p) const
}
}
else
if
(
prev
->
can_eval
())
else
if
(
prev
->
can_eval
())
{
{
auto
c
=
p
.
insert_instruction
(
arg
,
op
::
contiguous
{},
prev
);
auto
c
=
op
::
contiguous
{};
p
.
replace_instruction
(
arg
,
op
::
identity
{},
c
);
auto
r
=
c
.
compute
(
c
.
compute_shape
({
prev
->
get_shape
()}),
{
prev
->
eval
()});
auto
l
=
p
.
add_literal
(
r
.
get_shape
(),
r
.
data
());
p
.
replace_instruction
(
arg
,
l
);
}
}
}
}
}
}
...
...
src/targets/gpu/target.cpp
View file @
b324b9ed
...
@@ -62,8 +62,6 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
...
@@ -62,8 +62,6 @@ 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