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
6d58c07a
Commit
6d58c07a
authored
Nov 16, 2018
by
Shucai Xiao
Browse files
More changes for the sin operator.
parent
fdce6293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+12
-0
No files found.
src/targets/gpu/lowering.cpp
View file @
6d58c07a
...
...
@@ -19,6 +19,7 @@
#include <migraphx/gpu/leaky_relu.hpp>
#include <migraphx/gpu/softmax.hpp>
#include <migraphx/gpu/add.hpp>
#include <migraphx/gpu/sin.hpp>
#include <migraphx/gpu/mul.hpp>
#include <migraphx/gpu/batchnorm.hpp>
#include <migraphx/gpu/pooling.hpp>
...
...
@@ -67,6 +68,10 @@ struct miopen_apply
{
check_shape
(
s
,
apply_add
(
it
));
}
else
if
(
it
->
name
()
==
"sin"
)
{
check_shape
(
s
,
apply_sin
(
it
));
}
else
if
(
it
->
name
()
==
"mul"
)
{
check_shape
(
s
,
apply_mul
(
it
));
...
...
@@ -165,6 +170,13 @@ struct miopen_apply
ins
,
hip_add
{},
ins
->
inputs
().
at
(
0
),
ins
->
inputs
().
at
(
1
),
output
);
}
instruction_ref
apply_sin
(
instruction_ref
ins
)
{
auto
output
=
insert_allocation
(
ins
,
ins
->
get_shape
());
return
prog
->
replace_instruction
(
ins
,
hip_sin
{},
ins
->
inputs
().
at
(
0
),
output
);
}
instruction_ref
apply_mul
(
instruction_ref
ins
)
{
auto
output
=
insert_allocation
(
ins
,
ins
->
get_shape
());
...
...
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