"cacheflow/model_executor/models/opt.py" did not exist on "1f01a18d39b7fc873b79024b5799597cb6fc88bc"
mul.cpp 775 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
#include <migraphx/gpu/device/mul.hpp>
#include <migraphx/gpu/device/nary.hpp>
Khalique's avatar
Khalique committed
3

Paul's avatar
Paul committed
4
namespace migraphx {
Paul's avatar
Paul committed
5
inline namespace MIGRAPHX_INLINE_NS {
Khalique's avatar
Khalique committed
6
7
8
namespace gpu {
namespace device {

Khalique's avatar
Khalique committed
9
void mul(hipStream_t stream, const argument& result, const argument& arg1, const argument& arg2)
Khalique's avatar
Khalique committed
10
{
11
    nary(stream, result, arg1, arg2)([](auto x, auto y) __device__ { return x * y; });
Khalique's avatar
Khalique committed
12
13
14
15
16
17
18
19
}

void mul(hipStream_t stream,
         const argument& result,
         const argument& arg1,
         const argument& arg2,
         const argument& arg3)
{
20
21
    nary(stream, result, arg1, arg2, arg3)([](auto x, auto y, auto z)
                                               __device__ { return x * y * z; });
Khalique's avatar
Khalique committed
22
23
24
25
}

} // namespace device
} // namespace gpu
Paul's avatar
Paul committed
26
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
27
} // namespace migraphx