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
e27adf86
Commit
e27adf86
authored
Oct 24, 2018
by
Paul
Browse files
Enable cse on the gpu
parent
bb3a1061
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/include/migraph/builtin.hpp
src/include/migraph/builtin.hpp
+15
-0
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+3
-0
No files found.
src/include/migraph/builtin.hpp
View file @
e27adf86
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <migraph/context.hpp>
#include <migraph/context.hpp>
#include <migraph/errors.hpp>
#include <migraph/errors.hpp>
#include <migraph/argument.hpp>
#include <migraph/argument.hpp>
#include <migraph/reflect.hpp>
namespace
migraph
{
namespace
migraph
{
...
@@ -22,6 +23,13 @@ struct literal
...
@@ -22,6 +23,13 @@ struct literal
struct
outline
struct
outline
{
{
shape
s
;
shape
s
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
pack
(
f
(
self
.
s
,
"shape"
));
}
std
::
string
name
()
const
{
return
"@outline"
;
}
std
::
string
name
()
const
{
return
"@outline"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
return
s
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
return
s
;
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
...
@@ -33,6 +41,13 @@ struct outline
...
@@ -33,6 +41,13 @@ struct outline
struct
param
struct
param
{
{
std
::
string
parameter
;
std
::
string
parameter
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
pack
(
f
(
self
.
parameter
,
"parameter"
));
}
std
::
string
name
()
const
{
return
"@param"
;
}
std
::
string
name
()
const
{
return
"@param"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
...
...
src/targets/gpu/target.cpp
View file @
e27adf86
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <migraph/simplify_algebra.hpp>
#include <migraph/simplify_algebra.hpp>
#include <migraph/constant_propagate.hpp>
#include <migraph/constant_propagate.hpp>
#include <migraph/eliminate_contiguous.hpp>
#include <migraph/eliminate_contiguous.hpp>
#include <migraph/common_subexpression_elimination.hpp>
#include <migraph/fwd_conv_batchnorm_rewrite.hpp>
#include <migraph/fwd_conv_batchnorm_rewrite.hpp>
namespace
migraph
{
namespace
migraph
{
...
@@ -27,6 +28,8 @@ std::vector<pass> target::get_passes(migraph::context& gctx) const
...
@@ -27,6 +28,8 @@ std::vector<pass> target::get_passes(migraph::context& gctx) const
dead_code_elimination
{},
dead_code_elimination
{},
fwd_conv_batchnorm_rewrite
{},
fwd_conv_batchnorm_rewrite
{},
dead_code_elimination
{},
dead_code_elimination
{},
common_subexpression_elimination
{},
dead_code_elimination
{},
simplify_algebra
{},
simplify_algebra
{},
dead_code_elimination
{},
dead_code_elimination
{},
constant_propagate
{},
constant_propagate
{},
...
...
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