Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BowenBao
Copy link
Contributor

@BowenBao BowenBao commented May 11, 2023

Fixes #5212

Signed-off-by: BowenBao <[email protected]>
@gramalingam
Copy link
Contributor

Thanks for the fix. I don't think it has to do with optional parameter (because Shape doesn't have an optional parameter). But this problem can show up in other cases (eg., erroneous model, etc.). The model-checker will catch cases where we have a call to Shape without a parameter, but if we try running shape-inference before running the checker (as you mentioned elsewhere), this could be a problem. It could happen in other places too, because this style of code has been used quite a bit.

@gramalingam
Copy link
Contributor

As I discuss elsewhere, this could be a cascading problem arising out of the fact that attribute-parameters with default-values are not yet handled by checker/inference.

@jcwchen jcwchen added the module: shape inference Issues related to shape inference label May 11, 2023
@BowenBao
Copy link
Contributor Author

Thanks @gramalingam for analysis! Indeed there is another root problem to be fixed. I'm going to try track in the example model where it first happened. Will update on the original issue.

@gramalingam
Copy link
Contributor

gramalingam commented May 11, 2023

Thanks @gramalingam for analysis! Indeed there is another root problem to be fixed. I'm going to try track in the example model where it first happened. Will update on the original issue.

This change helps me process the short-example you had ("maf_gpt2_tiny.onnx"). May be you can try it on the bigger example. (I am sure there will be other places where change is required to handle attributes-with-default-values.)

@gramalingam gramalingam merged commit fa9e209 into onnx:main May 11, 2023
@BowenBao

This comment was marked as duplicate.

q-ycong-p pushed a commit to q-ycong-p/onnx that referenced this pull request May 18, 2023
…meters (onnx#5219)

Signed-off-by: BowenBao <[email protected]>
Co-authored-by: G. Ramalingam <[email protected]>
Signed-off-by: Yu Cong <[email protected]>
adityagoel4512 pushed a commit to adityagoel4512/onnx that referenced this pull request Jul 28, 2023
…meters (onnx#5219)

Signed-off-by: BowenBao <[email protected]>
Co-authored-by: G. Ramalingam <[email protected]>
Signed-off-by: Aditya Goel <[email protected]>
@abock abock mentioned this pull request Aug 3, 2023
5 tasks
yuanyao-nv pushed a commit to yuanyao-nv/onnx that referenced this pull request Aug 7, 2023
yuanyao-nv pushed a commit to yuanyao-nv/onnx that referenced this pull request Aug 7, 2023
…meters (onnx#5219)

Signed-off-by: BowenBao <[email protected]>
Co-authored-by: G. Ramalingam <[email protected]>
Signed-off-by: Yuan Yao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: shape inference Issues related to shape inference

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Segfault running shape inference with data_prop=True on model with nested function.

3 participants