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

Support for Boolean Data Types #207

Open
astnmsn opened this issue Mar 27, 2024 · 0 comments
Open

Support for Boolean Data Types #207

astnmsn opened this issue Mar 27, 2024 · 0 comments

Comments

@astnmsn
Copy link

astnmsn commented Mar 27, 2024

Is your feature request related to a problem? Please describe.

I am currently trying to run segment anything in the browser in a rust binary that is targeting wasm. I am using the vit_b onnx model provided in the list here (direct download)

It took many iterations to get the model into the state where i hit this issue.

  1. Removed all dynamically sized inputs and intermediaries
  2. Ran through onnx-simplifier to remove some of the operations that nnx was not able to infer the shape of
  3. Hacked in support for inference on Not and Equal operators (some likelihood this was not done correctly, but should not be the source of the main issue)
  4. Removed the dynamically sized outputs when running nnx prepare on the model

At this point when running the model I was faced with a IrError(Type(NotSupported(BOOL)) which indicates the model is expecting a data type that does not fit into the existing supported list.

Each of these workarounds does pose a serious limitation to use wonnx for this task. But it doesn't seem this final one can be worked around.

It is possible that after this, the model is still unusable for other reasons.

Describe the solution you'd like

Implementation of BOOL data type support

Describe alternatives you've considered

Restructuring the model in various ways to fit current support.

Additional context

While this issue is strictly looking at the BOOL data type, it would be awesome to have the other shortcomings mentioned looked at as well.

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

1 participant