Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design for operators with dynamic shape functions #948

Open
scxiao opened this issue Sep 9, 2021 · 1 comment
Open

Design for operators with dynamic shape functions #948

scxiao opened this issue Sep 9, 2021 · 1 comment
Assignees

Comments

@scxiao
Copy link
Contributor

scxiao commented Sep 9, 2021

Some operators output dynamic shape for different inputs (even input shapes are the same), but MIGraphX can only generate fixed output shape. Because of this, MIGraphX always use the max possible output shape even the actual output shape is smaller.

This problem applies to: Loop, NonZero, NonMaxSuppression. We need to come up with a general approach to resolve this problem.

@scxiao scxiao mentioned this issue Sep 9, 2021
causten pushed a commit that referenced this issue Sep 16, 2021
Add Loop operator for opset version 13.
Notes: 1) Default max iteration number is 10 if no max iteration number is provided
2) To change the max iter number, a user can set the max_loop_iterations in the onnx_option struct when parsing a model.
3) The returned shape of the scan output is from the max_loop_iterations even the actual loop num is less than that. This issue also applies to other operators like NonZero and NonMaxSuppression. A issue #948 is created to track this and to be resolved later.

Co-authored-by: Paul <pfultz2@yahoo.com>
Co-authored-by: mvermeulen <5479696+mvermeulen@users.noreply.github.com>
causten pushed a commit that referenced this issue Oct 28, 2021
This PR is the ref implementation of the nonmaxsuppression operator. It always returns the max possible output shape, which is the problem tracked in issue #948.
@CharlieL7 CharlieL7 self-assigned this Jan 6, 2023
@CharlieL7 CharlieL7 changed the title Operator dynamic output shape Operators with dynamic shape functions Jan 6, 2023
@CharlieL7
Copy link
Collaborator

For reference we currently create a buffer of maximum size for NonMaxSuppression using the max dynamic_dimension values. Will likely do the same for other reference operators with dynamic shape functions.

@CharlieL7 CharlieL7 changed the title Operators with dynamic shape functions Design for operators with dynamic shape functions Jan 6, 2023
@ROCm ROCm deleted a comment from causten Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants