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

Make ONNX to TOSA conversion resistant to dynamic types #214

Open
wants to merge 2 commits into
base: feature/onnx-to-tosa
Choose a base branch
from

Conversation

jorickert
Copy link

@jorickert jorickert commented Nov 25, 2024

This PR consists out of two parts:

  • Use computeShape and check its return value instead of computeShapeAndAssertOnFailure in the ONNX to TOSA lowering, to prevent crashes in the presence of dynamic types
  • Various shape inference functions call getShapedTypeRank . Check in these if the type is ranked and return a failure otherwise. (Not reporting an error, as this does not mean that the operation is malformed, just that its input is not ranked). Maybe upstream this change

@jorickert jorickert changed the title Jrickert.onnx to tosa dyn Make ONNX to TOSA conversion resistant to dynamic types Nov 25, 2024
@jorickert jorickert force-pushed the jrickert.onnx-to-tosa-dyn branch 2 times, most recently from 5426dc8 to 02d9b38 Compare November 25, 2024 11:16
@jorickert jorickert marked this pull request as ready for review November 25, 2024 11:19
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

Successfully merging this pull request may close these issues.

2 participants