convert.cpp 682 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);
}

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

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