Commit 6d58c07a authored by Shucai Xiao's avatar Shucai Xiao
Browse files

More changes for the sin operator.

parent fdce6293
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment