"...server/git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "2559b3e73d4d06e0d8393f21375f8d6e4d7b34a2"
logsoftmax.cpp 809 Bytes
Newer Older
1
#include <migraphx/gpu/logsoftmax.hpp>
2
#include <migraphx/gpu/device/logsoftmax.hpp>
3
4
5
6
7
8
9
10
11
#include <migraphx/operators.hpp>
#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)});
}

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

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