Skip to content

Conversation

@TE-7000026184
Copy link

No description provided.

@TE-7000026184 TE-7000026184 changed the title feat: support graph encoding backend auto-detection in wasi-nn [WIP] feat: support graph encoding backend auto-detection in wasi-nn Nov 14, 2025
@TE-7000026184
Copy link
Author

TE-7000026184 commented Nov 28, 2025

In current implementation of this PR, we assume that loading will fail if the format is not matched.
However, after checking some code, it seems the result of "load" function cannot indicate whether the file is in the correct format, for some back-ends, "load" functions only do some memory copy works.

Wondering whether there is an additional API for each back-end to check whether the model file is encoded in its way?
Plan B is to look into the content of the model file to be loaded. For "tflite" and "h5" format, header of the file contains magic number to verify the format, but "onnx" and some other formats do not have such things.

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.

1 participant