Commit 759daeb6 authored by Paul's avatar Paul
Browse files

Remove cpu verion for miopen_add

parent 9fed6960
...@@ -97,8 +97,8 @@ struct check_shapes ...@@ -97,8 +97,8 @@ struct check_shapes
const check_shapes& not_broadcasted() const const check_shapes& not_broadcasted() const
{ {
// if(!this->all_of([](const shape& s) { return not s.broadcasted(); })) if(!this->all_of([](const shape& s) { return not s.broadcasted(); }))
// MIGRAPH_THROW(prefix() + "Shapes are broadcasted"); MIGRAPH_THROW(prefix() + "Shapes are broadcasted");
return *this; return *this;
} }
......
...@@ -179,21 +179,6 @@ struct miopen_add ...@@ -179,21 +179,6 @@ struct miopen_add
argument argument
compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const
{
if(args[1].get_shape().broadcasted())
{
argument result{output_shape};
visit_all(result, from_gpu(args[0]), from_gpu(args[1]))(
[&](auto output, auto input1, auto input2) {
shape_for_each(output.get_shape(), [&](const auto& idx) {
output(idx.begin(), idx.end()) =
input1(idx.begin(), idx.end()) + input2(idx.begin(), idx.end());
});
});
return to_gpu(result);
}
else
{ {
float alpha = 1, beta = 0; float alpha = 1, beta = 0;
auto a_desc = make_tensor(args[0].get_shape()); auto a_desc = make_tensor(args[0].get_shape());
...@@ -212,7 +197,6 @@ struct miopen_add ...@@ -212,7 +197,6 @@ struct miopen_add
args[2].implicit()); args[2].implicit());
return args[2]; return args[2];
} }
}
}; };
struct miopen_gemm struct miopen_gemm
......
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