concat.cpp 801 Bytes
Newer Older
1
2
3
4
5
6
7
8
#include <migraph/gpu/concat.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/device/concat.hpp>
#include <utility>

namespace migraph {
9
namespace MIGRAPH_INLINE_NS {
10
11
namespace gpu {

wsttiger's avatar
wsttiger committed
12
shape hip_concat::compute_shape(std::vector<shape> inputs) const
13
14
15
16
17
{
    inputs.pop_back();
    return op.compute_shape(inputs);
}

Paul's avatar
Paul committed
18
19
20
argument hip_concat::compute(context& ctx,
                             const shape& output_shape,
                             const std::vector<argument>& args) const
21
{
22
    std::vector<std::size_t> offsets = op.compute_offsets(output_shape, args);
Paul's avatar
Paul committed
23
    return device::concat(ctx.get_stream().get(), output_shape, args, offsets);
24
25
26
}

} // namespace gpu
27
} // namespace MIGRAPH_INLINE_NS
28
} // namespace migraph