Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
a8965e51
Commit
a8965e51
authored
Nov 26, 2018
by
Shucai Xiao
Browse files
added one more template function for gpu_lowering.
parent
d817ff5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+9
-5
No files found.
src/targets/gpu/lowering.cpp
View file @
a8965e51
...
@@ -77,11 +77,11 @@ struct miopen_apply
...
@@ -77,11 +77,11 @@ struct miopen_apply
apply_map
[
"acos"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_acos
>
;
apply_map
[
"acos"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_acos
>
;
apply_map
[
"atan"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_atan
>
;
apply_map
[
"atan"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_atan
>
;
apply_map
[
"mul"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_mul
>
;
apply_map
[
"mul"
]
=
&
miopen_apply
::
apply_generic_op
<
hip_mul
>
;
apply_map
[
"dot"
]
=
&
miopen_apply
::
apply_
generic
_op
<
miopen_gemm
>
;
apply_map
[
"dot"
]
=
&
miopen_apply
::
apply_
extend
_op
<
miopen_gemm
,
op
::
dot
>
;
apply_map
[
"contiguous"
]
=
&
miopen_apply
::
apply_
contiguous
;
apply_map
[
"contiguous"
]
=
&
miopen_apply
::
apply_
extend_op
<
miopen_contiguous
,
op
::
contiguous
>
;
apply_map
[
"concat"
]
=
&
miopen_apply
::
apply_
concat
;
apply_map
[
"concat"
]
=
&
miopen_apply
::
apply_
extend_op
<
hip_concat
,
op
::
concat
>
;
apply_map
[
"batch_norm_inference"
]
=
&
miopen_apply
::
apply_batch_norm_inference
;
apply_map
[
"batch_norm_inference"
]
=
&
miopen_apply
::
apply_batch_norm_inference
;
apply_map
[
"softmax"
]
=
&
miopen_apply
::
apply_
softmax
;
apply_map
[
"softmax"
]
=
&
miopen_apply
::
apply_
extend_op
<
miopen_softmax
,
op
::
softmax
>
;
}
}
void
apply
()
void
apply
()
...
@@ -191,12 +191,14 @@ struct miopen_apply
...
@@ -191,12 +191,14 @@ struct miopen_apply
ins
,
miopen_elu
{
std
::
move
(
ad
)},
ins
->
inputs
().
at
(
0
),
output
);
ins
,
miopen_elu
{
std
::
move
(
ad
)},
ins
->
inputs
().
at
(
0
),
output
);
}
}
/*
instruction_ref apply_softmax(instruction_ref ins)
instruction_ref apply_softmax(instruction_ref ins)
{
{
auto&& op = any_cast<op::softmax>(ins->get_operator());
auto&& op = any_cast<op::softmax>(ins->get_operator());
auto output = insert_allocation(ins, ins->get_shape());
auto output = insert_allocation(ins, ins->get_shape());
return prog->replace_instruction(ins, miopen_softmax{op}, ins->inputs().at(0), output);
return prog->replace_instruction(ins, miopen_softmax{op}, ins->inputs().at(0), output);
}
}
*/
template
<
class
T
>
template
<
class
T
>
instruction_ref
apply_generic_op
(
instruction_ref
ins
)
instruction_ref
apply_generic_op
(
instruction_ref
ins
)
...
@@ -233,6 +235,7 @@ struct miopen_apply
...
@@ -233,6 +235,7 @@ struct miopen_apply
}
}
*/
*/
/*
instruction_ref apply_contiguous(instruction_ref ins)
instruction_ref apply_contiguous(instruction_ref ins)
{
{
auto&& op = any_cast<op::contiguous>(ins->get_operator());
auto&& op = any_cast<op::contiguous>(ins->get_operator());
...
@@ -248,6 +251,7 @@ struct miopen_apply
...
@@ -248,6 +251,7 @@ struct miopen_apply
refs.push_back(output);
refs.push_back(output);
return prog->replace_instruction(ins, hip_concat{op}, refs);
return prog->replace_instruction(ins, hip_concat{op}, refs);
}
}
*/
instruction_ref
apply_batch_norm_inference
(
instruction_ref
ins
)
instruction_ref
apply_batch_norm_inference
(
instruction_ref
ins
)
{
{
...
...
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