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
f792097f
"...composable_kernel_rocm.git" did not exist on "70eefcf4f263aa5c25f3c9ff0db8f6f199ef0fb9"
Commit
f792097f
authored
Jan 23, 2019
by
Shucai Xiao
Browse files
clang format
parent
d4594903
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
src/include/migraphx/rewrite_gru.hpp
src/include/migraphx/rewrite_gru.hpp
+10
-10
src/rewrite_gru.cpp
src/rewrite_gru.cpp
+2
-2
src/targets/cpu/target.cpp
src/targets/cpu/target.cpp
+1
-4
No files found.
src/include/migraphx/rewrite_gru.hpp
View file @
f792097f
...
@@ -22,16 +22,16 @@ struct rewrite_gru
...
@@ -22,16 +22,16 @@ struct rewrite_gru
private:
private:
std
::
vector
<
instruction_ref
>
gru_oper
(
bool
is_forward
,
std
::
vector
<
instruction_ref
>
gru_oper
(
bool
is_forward
,
program
&
prog
,
program
&
prog
,
instruction_ref
ins
,
instruction_ref
ins
,
instruction_ref
input
,
instruction_ref
input
,
instruction_ref
wx
,
instruction_ref
wx
,
instruction_ref
wh
,
instruction_ref
wh
,
instruction_ref
ih
,
instruction_ref
ih
,
instruction_ref
bias
,
instruction_ref
bias
,
int
linear_before_reset
,
int
linear_before_reset
,
operation
&
actv_func1
,
operation
&
actv_func1
,
operation
&
actv_func2
)
const
;
operation
&
actv_func2
)
const
;
};
};
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/rewrite_gru.cpp
View file @
f792097f
...
@@ -198,12 +198,12 @@ std::vector<instruction_ref> rewrite_gru::gru_oper(bool is_forward,
...
@@ -198,12 +198,12 @@ std::vector<instruction_ref> rewrite_gru::gru_oper(bool is_forward,
{
{
auto
wbz
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
0
},
{
hs
}},
bias
);
auto
wbz
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
0
},
{
hs
}},
bias
);
auto
wbr
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
hs
},
{
2
*
hs
}},
bias
);
auto
wbr
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
hs
},
{
2
*
hs
}},
bias
);
auto
wbh
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
2
*
hs
},
{
3
*
hs
}},
bias
);
auto
wbh
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
2
*
hs
},
{
3
*
hs
}},
bias
);
br_wbh
=
prog
.
insert_instruction
(
ins
,
op
::
broadcast
{
1
,
ih
->
get_shape
()},
wbh
);
br_wbh
=
prog
.
insert_instruction
(
ins
,
op
::
broadcast
{
1
,
ih
->
get_shape
()},
wbh
);
auto
rbz
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
3
*
hs
},
{
4
*
hs
}},
bias
);
auto
rbz
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
3
*
hs
},
{
4
*
hs
}},
bias
);
auto
rbr
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
4
*
hs
},
{
5
*
hs
}},
bias
);
auto
rbr
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
4
*
hs
},
{
5
*
hs
}},
bias
);
auto
rbh
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
5
*
hs
},
{
6
*
hs
}},
bias
);
auto
rbh
=
prog
.
insert_instruction
(
ins
,
op
::
slice
{{
0
},
{
5
*
hs
},
{
6
*
hs
}},
bias
);
br_rbh
=
prog
.
insert_instruction
(
ins
,
op
::
broadcast
{
1
,
ih
->
get_shape
()},
rbh
);
br_rbh
=
prog
.
insert_instruction
(
ins
,
op
::
broadcast
{
1
,
ih
->
get_shape
()},
rbh
);
auto
bz
=
prog
.
insert_instruction
(
ins
,
op
::
add
{},
wbz
,
rbz
);
auto
bz
=
prog
.
insert_instruction
(
ins
,
op
::
add
{},
wbz
,
rbz
);
...
...
src/targets/cpu/target.cpp
View file @
f792097f
...
@@ -13,10 +13,7 @@ std::string target::name() const { return "cpu"; }
...
@@ -13,10 +13,7 @@ std::string target::name() const { return "cpu"; }
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
)
const
std
::
vector
<
pass
>
target
::
get_passes
(
migraphx
::
context
&
)
const
{
{
return
{
auto_contiguous
{},
return
{
auto_contiguous
{},
rewrite_rnn
{},
rewrite_gru
{},
lowering
{}};
rewrite_rnn
{},
rewrite_gru
{},
lowering
{}};
}
}
}
// namespace cpu
}
// namespace cpu
...
...
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