MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_output_shapes

Method get_output_shapes

src/module.cpp:728–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728std::vector<shape> module::get_output_shapes() const
729{
730 if(impl->instructions.empty())
731 return {};
732 auto last_ins = impl->instructions.back();
733 if(last_ins.name() == "@return")
734 {
735 const auto& output_ins = last_ins.inputs();
736 std::vector<shape> output_shapes;
737 std::transform(output_ins.begin(),
738 output_ins.end(),
739 std::back_inserter(output_shapes),
740 [](auto& ins) { return ins->get_shape(); });
741
742 return output_shapes;
743 }
744 // The else branch is to provide backward compatibility
745 else
746 {
747 return {last_ins.get_shape()};
748 }
749}
750
751std::vector<shape> module::compute_shapes(const std::vector<shape>& inputs,
752 compute_shapes_options options) const

Callers 15

get_output_shapesFunction · 0.45
TEST_CASEFunction · 0.45
TEST_CASEFunction · 0.45
TEST_CASEFunction · 0.45
expect_shapeFunction · 0.45
TEST_CASEFunction · 0.45
compute_shapeMethod · 0.45
literal_broadcastFunction · 0.45
TEST_CASEFunction · 0.45
create_program_from_mlirFunction · 0.45
create_programMethod · 0.45
create_programMethod · 0.45

Calls 8

backMethod · 0.80
transformFunction · 0.50
emptyMethod · 0.45
nameMethod · 0.45
inputsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
get_shapeMethod · 0.45

Tested by 15

TEST_CASEFunction · 0.36
TEST_CASEFunction · 0.36
expect_shapeFunction · 0.36
TEST_CASEFunction · 0.36
compute_shapeMethod · 0.36
literal_broadcastFunction · 0.36
TEST_CASEFunction · 0.36
create_programMethod · 0.36
create_programMethod · 0.36
create_programMethod · 0.36
test_conv_reluFunction · 0.36
test_save_load_bufferFunction · 0.36