logsoftmax.cpp 732 Bytes
Newer Older
1
#include <migraphx/gpu/logsoftmax.hpp>
2
#include <migraphx/gpu/device/logsoftmax.hpp>
3
#include <migraphx/op/logsoftmax.hpp>
4
5
6
7
8
9
10
11
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {

12
shape hip_logsoftmax::compute_shape(const std::vector<shape>& inputs) const
13
14
15
16
17
{
    check_shapes{inputs, *this}.has(2).standard();
    return op.compute_shape({inputs.at(0)});
}

Paul's avatar
Paul committed
18
19
argument
hip_logsoftmax::compute(context& ctx, const shape&, const std::vector<argument>& args) const
20
{
Paul's avatar
Paul committed
21
    return device::logsoftmax(ctx.get_stream().get(), args[1], args[0], op.axis);
22
23
24
25
26
}

} // namespace gpu
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx