convert.cpp 609 Bytes
Newer Older
1
2
#include <migraphx/gpu/convert.hpp>
#include <migraphx/gpu/device/convert.hpp>
3
4
5
6
7
8
#include <migraphx/gpu/context.hpp>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {

9
shape hip_convert::compute_shape(std::vector<shape> inputs) const
10
11
{
    inputs.pop_back();
12
    check_shapes{inputs}.packed();
13
14
15
    return op.compute_shape(inputs);
}

Shucai Xiao's avatar
Shucai Xiao committed
16
argument hip_convert::compute(context& ctx, const shape&, const std::vector<argument>& args) const
17
{
18
    return device::convert(ctx.get_stream().get(), args[1], args[0]);
19
20
21
22
23
}

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