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
751baff3
Commit
751baff3
authored
Apr 12, 2019
by
Paul
Browse files
Rename const prop pass
parent
28d0e337
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/include/migraphx/propagate_constant.hpp
src/include/migraphx/propagate_constant.hpp
+4
-4
src/propagate_constant.cpp
src/propagate_constant.cpp
+2
-2
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+2
-2
test/propagate_constant_test.cpp
test/propagate_constant_test.cpp
+2
-2
No files found.
src/CMakeLists.txt
View file @
751baff3
...
@@ -5,7 +5,7 @@ include(ROCMPackageConfigHelpers)
...
@@ -5,7 +5,7 @@ include(ROCMPackageConfigHelpers)
add_library
(
migraphx
add_library
(
migraphx
auto_contiguous.cpp
auto_contiguous.cpp
common_subexpression_elimination.cpp
common_subexpression_elimination.cpp
constant_
propagate.cpp
propagate
_constant
.cpp
dead_code_elimination.cpp
dead_code_elimination.cpp
eliminate_allocation.cpp
eliminate_allocation.cpp
eliminate_contiguous.cpp
eliminate_contiguous.cpp
...
...
src/include/migraphx/
constant_
propagate.hpp
→
src/include/migraphx/propagate
_constant
.hpp
View file @
751baff3
#ifndef MIGRAPHX_GUARD_RTGLIB_
CONSTANT_
PROPAGATE_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_PROPAGATE
_CONSTANT
_HPP
#define MIGRAPHX_GUARD_RTGLIB_
CONSTANT_
PROPAGATE_HPP
#define MIGRAPHX_GUARD_RTGLIB_PROPAGATE
_CONSTANT
_HPP
#include <string>
#include <string>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
...
@@ -12,9 +12,9 @@ struct program;
...
@@ -12,9 +12,9 @@ struct program;
/**
/**
* Replace instructions which take all literals with a literal of the computation.
* Replace instructions which take all literals with a literal of the computation.
*/
*/
struct
constant_
propagate
struct
propagate
_constant
{
{
std
::
string
name
()
const
{
return
"
constant_
propagate"
;
}
std
::
string
name
()
const
{
return
"propagate
_constant
"
;
}
void
apply
(
program
&
p
)
const
;
void
apply
(
program
&
p
)
const
;
};
};
...
...
src/
constant_
propagate.cpp
→
src/propagate
_constant
.cpp
View file @
751baff3
#include <migraphx/
constant_
propagate.hpp>
#include <migraphx/propagate
_constant
.hpp>
#include <migraphx/program.hpp>
#include <migraphx/program.hpp>
#include <migraphx/matcher.hpp>
#include <migraphx/matcher.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/literal.hpp>
...
@@ -19,7 +19,7 @@ bool skip_propogate(instruction_ref ins)
...
@@ -19,7 +19,7 @@ bool skip_propogate(instruction_ref ins)
return
false
;
return
false
;
}
}
void
constant_
propagate
::
apply
(
program
&
p
)
const
void
propagate
_constant
::
apply
(
program
&
p
)
const
{
{
fix
([
&
](
auto
self
,
auto
ins
)
{
fix
([
&
](
auto
self
,
auto
ins
)
{
if
(
not
skip_propogate
(
ins
))
if
(
not
skip_propogate
(
ins
))
...
...
src/targets/gpu/target.cpp
View file @
751baff3
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/simplify_reshapes.hpp>
#include <migraphx/simplify_reshapes.hpp>
#include <migraphx/simplify_algebra.hpp>
#include <migraphx/simplify_algebra.hpp>
#include <migraphx/
constant_
propagate.hpp>
#include <migraphx/propagate
_constant
.hpp>
#include <migraphx/eliminate_contiguous.hpp>
#include <migraphx/eliminate_contiguous.hpp>
#include <migraphx/common_subexpression_elimination.hpp>
#include <migraphx/common_subexpression_elimination.hpp>
#include <migraphx/fwd_conv_batchnorm_rewrite.hpp>
#include <migraphx/fwd_conv_batchnorm_rewrite.hpp>
...
@@ -47,7 +47,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
...
@@ -47,7 +47,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
//dead_code_elimination{},
//dead_code_elimination{},
simplify_algebra
{},
simplify_algebra
{},
dead_code_elimination
{},
dead_code_elimination
{},
constant_
propagate
{},
propagate
_constant
{},
dead_code_elimination
{},
dead_code_elimination
{},
auto_contiguous
{},
auto_contiguous
{},
//simplify_reshapes{},
//simplify_reshapes{},
...
...
test/
constant_
propagate_test.cpp
→
test/propagate
_constant
_test.cpp
View file @
751baff3
#include <migraphx/
constant_
propagate.hpp>
#include <migraphx/propagate
_constant
.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/op/add.hpp>
#include <migraphx/op/add.hpp>
#include <basic_ops.hpp>
#include <basic_ops.hpp>
...
@@ -9,7 +9,7 @@ struct const_prop_target
...
@@ -9,7 +9,7 @@ struct const_prop_target
std
::
string
name
()
const
{
return
"const_prop"
;
}
std
::
string
name
()
const
{
return
"const_prop"
;
}
std
::
vector
<
migraphx
::
pass
>
get_passes
(
migraphx
::
context
&
)
const
std
::
vector
<
migraphx
::
pass
>
get_passes
(
migraphx
::
context
&
)
const
{
{
return
{
migraphx
::
constant_
propagate
{},
migraphx
::
dead_code_elimination
{}};
return
{
migraphx
::
propagate
_constant
{},
migraphx
::
dead_code_elimination
{}};
}
}
migraphx
::
context
get_context
()
const
{
return
{};
}
migraphx
::
context
get_context
()
const
{
return
{};
}
};
};
...
...
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