Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.
This repository was archived by the owner on May 7, 2025. It is now read-only.

Support for Boolean Data Types #207

@astnmsn

Description

@astnmsn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions