webonnx / wonnx

A WebGPU-accelerated ONNX inference run-time written 100% in Rust, ready for native and the web
Other
1.65k stars 60 forks source link

Add overview of ONNX operator (sets) supported #17

Closed pixelspark closed 2 years ago

pixelspark commented 2 years ago

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

For users it would be very helpful to know which operators are supported.

Describe the solution you'd like

A table listing all ONNX operators, indicating the level of support in WONNX (complete, partial/incorrect or no implementation) and the shader file the implementation is in (for developers).

The full list can be found here. It seems WONNX currently implements:

Describe alternatives you've considered

Additional context

pixelspark commented 2 years ago

Hm, seems you are still missing quite a bunch of ONNX ops? (e.g. Relu is not on the list).

haixuanTao commented 2 years ago

Yes, well, the thing is that:

But I am going to had a couple of Op before the end of the week to enable yolo.

If you want to run a specific model with unsupported Op, let me know and I can prioritise its ops. :smile:

pixelspark commented 2 years ago

@haixuanTao I fully understand! I'm not trying to run any specific models (from the commit log I see you are trying to make YOLO work - already quite an impressive list, more so if YOLO works!), just suggesting things that could bring the project forward to a more generally usable state.

I think it would be very helpful to have a list somewhere of the ops that onnxsimplifier can output with the current implementation status. If we manage to (at some point) implement all of them you can basically say that there is support for any ONNX model (given you run through the simplifier first). A list like this allows contributors to easily see where they can make the most impact towards that goal (I have no experience with WGSL but might have a go at implementing one or two ops if I can find the time. Currently I have no idea however about what would be the most sought-after op to implement?).

haixuanTao commented 2 years ago

Yes, full Support for all onnx model is definitely an objective! :rocket:

I have searched but haven't found any list of onnx simplifier node... My general experience is that you can sort of guess what node can be simplified and what node can't.

I guess you can try to find a model you like within: https://github.com/onnx/models and see what node are missing when you try to run it.

I have made a guide on building new op within the Readme. You can check it out here: https://github.com/haixuanTao/wonnx#contribution-on-implementing-a-new-operator

pixelspark commented 2 years ago

I have made a guide on building new op within the Readme. You can check it out here: https://github.com/haixuanTao/wonnx#contribution-on-implementing-a-new-operator

This is brilliant, more projects should have this!

Really interested in trying this, hopefully after Christmas there will be some more free time to dive in to this :-)