exp.cpp 658 Bytes
Newer Older
Shucai Xiao's avatar
Shucai Xiao committed
1
2
3
4
5
6
7
8
#include <migraphx/gpu/exp.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>

namespace migraphx {
9
inline namespace MIGRAPHX_INLINE_NS {
Shucai Xiao's avatar
Shucai Xiao committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace gpu {

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

argument hip_exp::compute(context& ctx, const shape&, const std::vector<argument>& args) const
{
    device::exp(ctx.get_stream().get(), args[1], args[0]);
    return args[1];
}

} // namespace gpu
25
} // namespace MIGRAPHX_INLINE_NS
Shucai Xiao's avatar
Shucai Xiao committed
26
} // namespace migraphx