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
af7b5f89
Commit
af7b5f89
authored
Jul 06, 2018
by
Paul
Browse files
Update miopen target for passes
parent
45bdfaa0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
src/targets/cpu/cpu_target.cpp
src/targets/cpu/cpu_target.cpp
+2
-1
src/targets/miopen/include/migraph/miopen/miopen_target.hpp
src/targets/miopen/include/migraph/miopen/miopen_target.hpp
+1
-1
src/targets/miopen/miopen_target.cpp
src/targets/miopen/miopen_target.cpp
+9
-2
No files found.
src/targets/cpu/cpu_target.cpp
View file @
af7b5f89
...
...
@@ -4,6 +4,7 @@
#include <migraph/dfor.hpp>
#include <migraph/operators.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/iterator_for.hpp>
namespace
migraph
{
namespace
cpu
{
...
...
@@ -491,7 +492,7 @@ struct cpu_apply
void
apply
()
{
init
();
for
(
auto
it
=
prog
->
begin
();
it
!=
prog
->
end
();
it
++
)
for
(
auto
it
:
iterator_for
(
*
prog
)
)
{
if
(
it
->
op
.
name
()
==
"activation"
)
{
...
...
src/targets/miopen/include/migraph/miopen/miopen_target.hpp
View file @
af7b5f89
...
...
@@ -9,7 +9,7 @@ namespace miopen {
struct
miopen_target
{
std
::
string
name
()
const
;
void
apply
(
program
&
p
)
const
;
std
::
vector
<
pass
>
get_passes
(
context
&
ctx
)
const
;
context
get_context
()
const
;
};
...
...
src/targets/miopen/miopen_target.cpp
View file @
af7b5f89
...
...
@@ -299,9 +299,16 @@ struct miopen_apply
}
};
std
::
string
miopen_target
::
name
()
const
{
return
"miopen"
;
}
struct
miopen_pass
{
std
::
string
name
()
const
{
return
"miopen::pass"
;
}
void
apply
(
program
&
p
)
const
{
miopen_apply
{
&
p
}.
apply
();
}
};
std
::
vector
<
pass
>
miopen_target
::
get_passes
(
context
&
)
const
{
return
{
miopen_pass
{}};
}
void
miopen_target
::
apply
(
program
&
p
)
const
{
miopen_apply
{
&
p
}.
apply
()
;
}
std
::
string
miopen_target
::
name
()
const
{
return
"miopen"
;
}
context
miopen_target
::
get_context
()
const
{
...
...
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