mul.cpp 689 Bytes
Newer Older
Khalique's avatar
Khalique committed
1
2
3
4
5
6
7
#include <migraph/gpu/mul.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <utility>

namespace migraph {
8
inline namespace MIGRAPH_INLINE_NS {
Khalique's avatar
Khalique committed
9
10
11
12
13
14
15
16
17
namespace gpu {

shape hip_mul::compute_shape(const std::vector<shape>& inputs) const
{
    // check_shapes{inputs, *this}.has(3).standard();
    check_shapes{inputs, *this}.has(3);
    return inputs.at(0);
}

Khalique's avatar
Khalique committed
18
argument hip_mul::compute(context& ctx, const shape&, const std::vector<argument>& args) const
Khalique's avatar
Khalique committed
19
{
Khalique's avatar
Khalique committed
20
    device::mul(ctx.get_stream().get(), args[2], args[0], args[1]);
Khalique's avatar
Khalique committed
21
22
23
24
    return args[2];
}

} // namespace gpu
25
} // inline namespace MIGRAPH_INLINE_NS
Khalique's avatar
Khalique committed
26
} // namespace migraph