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

Method handle_inputs

src/onnx/parse_resize.cpp:607–632  ·  view source on GitHub ↗

Split of what we handle since this parser is used for both resize/upscale operators

Source from the content-addressed store, hash-verified

605
606 // Split of what we handle since this parser is used for both resize/upscale operators
607 static resize_args handle_inputs(const op_desc& opd,
608 const onnx_parser::node_info& info,
609 const std::vector<instruction_ref>& args)
610 {
611 resize_args resize;
612
613 // input data shape info
614 resize.in_s = args[0]->get_shape().to_static(1);
615 resize.in_lens = resize.in_s.lens();
616
617 // output shape is explicitly specified
618 resize.out_lens = std::vector<size_t>(resize.in_lens.size());
619
620 if(opd.op_name == "upsample")
621 {
622 set_upsample_attributes(info, resize);
623 set_upsample_args(args, resize);
624 }
625 else
626 {
627 set_resize_attributes(info, args, resize);
628 set_resize_args(args, resize);
629 }
630
631 return resize;
632 }
633
634 instruction_ref parse(const op_desc& opd,
635 const onnx_parser&,

Callers

nothing calls this directly

Calls 4

to_staticMethod · 0.80
lensMethod · 0.80
get_shapeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected