WebAssembly / wasi-nn

Neural Network proposal for WASI
469 stars 36 forks source link

add pytorch flag #25

Closed gusye1234 closed 2 years ago

gusye1234 commented 2 years ago

See more descriptions here

abrown commented 2 years ago

@gusye1234, looks like the wasi-nn.abi.md file needs to be updated as well. Apologies for all of the thrash on this but this WIT syntax and tooling is still relatively new and some of the initial wrinkles still have to be ironed out. In #26, I added a CONTRIBUTING.md file that should explain how to use wit-abi to auto-generate the ABI file. Can you run those steps in this branch?

gusye1234 commented 2 years ago

Thanks for the detailed description! Seem like wit-abi changed a little bit and unable to parse wit.md now, I ran into the error:

Error: failed to parse input "/Users/gus/Desktop/wasm/wasi-nn-spec/wasi-nn.wit.md"

Caused by:
    expected `type`, `resource`, or `func`, found '('
         --> /Users/gus/Desktop/wasm/wasi-nn-spec/wasi-nn.wit.md:90:15
          |
       90 | load: function(builder: graph-builder-array, encoding: graph-encoding, target: execution-target) -> expected<graph, error>

I used tags/wit-abi-0.4.0 for wit-abi, which I thought was the same version as the CI?

abrown commented 2 years ago

Hm, well things are changing quickly in the WIT world. I seem to remember function being changed to func recently in the WIT syntax. I'll investigate more on Monday because it is unclear to me why the tool is failing if it matches the CI version.

gusye1234 commented 2 years ago

Hm, well things are changing quickly in the WIT world. I seem to remember function being changed to func recently in the WIT syntax. I'll investigate more on Monday because it is unclear to me why the tool is failing if it matches the CI version.

My bad! I looked down into the CI, and found out the tag for wit-abi is wit-abi-0.2.0. Now everything works perfectly!