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

Method get_parameter_names

src/module.cpp:637–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637std::vector<std::string> module::get_parameter_names() const
638{
639 std::vector<std::string> result;
640 std::vector<builtin::param> params;
641 for(auto&& ins : impl->instructions)
642 {
643 if(ins.name() == "@param")
644 {
645 auto&& param = any_cast<builtin::param>(ins.get_operator());
646 params.push_back(param);
647 }
648 }
649 std::stable_sort(
650 params.begin(), params.end(), by(std::less<>{}, [](auto&& p) { return p.order; }));
651 std::transform(params.begin(), params.end(), std::back_inserter(result), [&](auto&& p) {
652 return p.parameter;
653 });
654 return result;
655}
656
657instruction_ref module::get_parameter(std::string name) const
658{

Callers 15

compute_shapesMethod · 0.95
TEST_CASEFunction · 0.45
TEST_CASEFunction · 0.45
get_output_paramsMethod · 0.45
create_mlir_submoduleFunction · 0.45
create_program_from_mlirFunction · 0.45
compute_shapeMethod · 0.45
compute_shapeMethod · 0.45
applyMethod · 0.45
compute_shapeMethod · 0.45
applyMethod · 0.45
is_offload_copy_setFunction · 0.45

Calls 7

stable_sortFunction · 0.85
byFunction · 0.50
transformFunction · 0.50
nameMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 3

TEST_CASEFunction · 0.36
TEST_CASEFunction · 0.36
get_output_paramsMethod · 0.36