gather.cpp 601 Bytes
Newer Older
1
#include <migraphx/gpu/gather.hpp>
Paul's avatar
Paul committed
2
3
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/device/gather.hpp>
4
5
6
7
8
9
10
11

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {

shape hip_gather::compute_shape(std::vector<shape> inputs) const
{
    inputs.pop_back();
Shucai Xiao's avatar
Shucai Xiao committed
12
    return op.normalize_compute_shape(inputs);
13
14
}

Paul's avatar
Paul committed
15
argument hip_gather::compute(context& ctx, const shape&, const std::vector<argument>& args) const
16
{
Paul's avatar
Paul committed
17
    return device::gather(ctx.get_stream().get(), args.back(), args[0], args[1], op.axis);
18
19
20
21
22
}

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