Skip to content

Support for set_aspect_ratio_policy for Resize (ONNX Opset 18) #4840

@cane122

Description

@cane122

While working with ONNX Opset 18 models, I noticed that the MIGraphX ONNX parser
does not yet support the following Resize attributes:

  • axes
  • set_aspect_ratio_policy

I may be missing some context, but there appears to be an active TODO in
parse_resize.cpp related to these attributes, suggesting this support is
planned but not yet implemented.

Error

model = migraphx.parse_onnx(onnx_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: /longer_pathname_so_that_rpms_can_support_packaging_the_debug_info_for_all_os_profiles/src/AMDMIGraphX/src/onnx/parse_resize.cpp:342: set_aspect_ratio_policy: PARSE_RESIZE: keep_aspect_ratio_policy is not supported!

heatmaps_resized = F.interpolate( heatmaps, size=self.target_hw, mode='bicubic', align_corners=True )

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions