"src/diffusers/pipelines/chroma/pipeline_chroma_img2img.py" did not exist on "8d386f7990194172e40f6da651e00f92312cd35e"
get_tuple_elem.cpp 685 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <migraphx/gpu/get_tuple_elem.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/device/contiguous.hpp>

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {

shape hip_get_tuple_elem::compute_shape(std::vector<shape> inputs) const
{
    inputs.pop_back();
    return op.compute_shape(inputs);
}

Shucai Xiao's avatar
Shucai Xiao committed
15
16
argument
hip_get_tuple_elem::compute(context& ctx, const shape&, const std::vector<argument>& args) const
17
18
19
20
21
22
23
24
25
{
    auto sub_args = args.front().get_sub_objects();
    device::contiguous(ctx.get_stream().get(), args.back(), sub_args[op.index]);
    return args.back();
}

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