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
8b28251b
Commit
8b28251b
authored
Aug 04, 2023
by
Khalique Ahmed
Browse files
update to replace module inputs, move pass down
parent
a8409aba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/auto_contiguous.cpp
src/auto_contiguous.cpp
+4
-1
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+1
-1
No files found.
src/auto_contiguous.cpp
View file @
8b28251b
...
@@ -76,7 +76,10 @@ void auto_contiguous::apply(module& m) const
...
@@ -76,7 +76,10 @@ void auto_contiguous::apply(module& m) const
if
(
new_args
!=
args
)
if
(
new_args
!=
args
)
{
{
m
.
replace_instruction
(
ins
,
ins
->
get_operator
(),
new_args
);
if
(
not
ins
->
module_inputs
().
empty
())
m
.
replace_instruction
(
ins
,
ins
->
get_operator
(),
new_args
,
ins
->
module_inputs
());
else
m
.
replace_instruction
(
ins
,
ins
->
get_operator
(),
new_args
);
}
}
// shape s = ins->get_shape();
// shape s = ins->get_shape();
// if(not s.dynamic() and not s.standard() and s.elements() != 0)
// if(not s.dynamic() and not s.standard() and s.elements() != 0)
...
...
src/targets/gpu/target.cpp
View file @
8b28251b
...
@@ -132,7 +132,6 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
...
@@ -132,7 +132,6 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
dead_code_elimination
{},
dead_code_elimination
{},
prefuse_ops
{},
prefuse_ops
{},
dead_code_elimination
{},
dead_code_elimination
{},
auto_contiguous
{},
optimize_module
{},
optimize_module
{},
fuse_pointwise
{},
fuse_pointwise
{},
dead_code_elimination
{},
dead_code_elimination
{},
...
@@ -144,6 +143,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
...
@@ -144,6 +143,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
dead_code_elimination
{},
dead_code_elimination
{},
enable_pass
(
mlir_enabled
(),
fuse_mlir
{
&
ctx
}),
enable_pass
(
mlir_enabled
(),
fuse_mlir
{
&
ctx
}),
dead_code_elimination
{},
dead_code_elimination
{},
auto_contiguous
{},
lowering
{
&
ctx
,
options
.
offload_copy
},
lowering
{
&
ctx
,
options
.
offload_copy
},
eliminate_contiguous
{
"gpu::contiguous"
},
eliminate_contiguous
{
"gpu::contiguous"
},
dead_code_elimination
{},
dead_code_elimination
{},
...
...
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