softmax.cpp 665 Bytes
Newer Older
Paul's avatar
Paul committed
1
#include <migraphx/gpu/softmax.hpp>
Khalique's avatar
Khalique committed
2
#include <migraphx/gpu/device/softmax.hpp>
3

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

Khalique's avatar
Khalique committed
8
shape hip_softmax::compute_shape(const std::vector<shape>& inputs) const
9
10
11
12
13
{
    check_shapes{inputs, *this}.has(2).standard();
    return op.compute_shape({inputs.at(0)});
}

Khalique's avatar
Khalique committed
14
argument hip_softmax::compute(context& ctx,
Khalique's avatar
Khalique committed
15
16
                              const shape& output_shape,
                              const std::vector<argument>& args) const
17
{
18
    return device::softmax(ctx.get_stream().get(), output_shape, args, op.axis);
19
20
21
}

} // namespace gpu
Paul's avatar
Paul committed
22
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
23
} // namespace migraphx