Skip to content

Conversation

tonibofarull
Copy link
Contributor

@tonibofarull tonibofarull commented Dec 24, 2022

@tonibofarull
Copy link
Contributor Author

tonibofarull commented Dec 29, 2022

TODO

  • Free mem of NNs used by an app on exit.

@wenyongh
Copy link
Contributor

wenyongh commented Jan 3, 2023

TODO

  • Free mem of NNs used by an app on exit.

@tonibofarull Have you finished this item and shall I merge the PR?
@yamt Are there any comments from you?

@tonibofarull
Copy link
Contributor Author

@wenyongh, I still need to check how it's done in wasi fdtable teardown.
We can proceed as you want:

  • Keep the PR open until I finish this topic.
  • Merge this and do it in another PR.

Thank you!

@wenyongh
Copy link
Contributor

wenyongh commented Jan 3, 2023

@wenyongh, I still need to check how it's done in wasi fdtable teardown. We can proceed as you want:

  • Keep the PR open until I finish this topic.
  • Merge this and do it in another PR.

Thank you!

Got it, had better keep the PR open until you finish it. Thanks.

Copy link
Contributor Author

@tonibofarull tonibofarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the warnings.
Only tensorflow specific are appearing and this one:

/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:126:5: warning: 'import_module' attribute directive ignored [-Wattributes]
  126 |     __attribute__((import_module("wasi_nn")));
      |     ^~~~~~~~~~~~~
/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:145:5: warning: 'import_module' attribute directive ignored [-Wattributes]
  145 |     __attribute__((import_module("wasi_nn")));
      |     ^~~~~~~~~~~~~
/home/wamr/core/iwasm/libraries/wasi-nn/wasi_nn.h:157:5: warning: 'import_module' attribute directive ignored [-Wattributes]
  157 |     __attribute__((import_module("wasi_nn")));

which corresponds to the import but needed in the linkage with the WASM code.

@tonibofarull
Copy link
Contributor Author

tonibofarull commented Jan 17, 2023

As stated here #1573, the next step will be to add GPU support.
Later on, I'll add the wasi-nn context per WASM app and supporting multiple networks at the same time.

Also, I'll work on checking the C/C++ bindings bytecodealliance/wasi-nn#75

@tonibofarull tonibofarull requested review from yamt and wenyongh and removed request for yamt and wenyongh January 18, 2023 20:45
@tonibofarull tonibofarull requested a review from yamt January 18, 2023 20:46
@tonibofarull
Copy link
Contributor Author

tonibofarull commented Jan 24, 2023

  • Ready for review

@wenyongh
Copy link
Contributor

  • Ready for review

@tonibofarull The coding guideline CI check failed for wasi_nn.c, could you use clang-format-12 to format the file?

sudo apt-get install clang-format-12
clang-format-12 -i --style=file path/to/file

Refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/3996791726/jobs/6857274884

Use `clang-format-12` or `git-clang-format-12` to check code format of
    the PR, with a commit range specified. It is required to format the
    code before committing the PR, or it might fail to pass the CI check:

    1. Install clang-format-12.0.0
    Normally we can install it by `sudo apt-get install clang-format-12`,
    or download the `clang+llvm-12.0.0-xxx-tar.xz` package from
      https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0
    and install it

    2. Format the C/C++ source file
    ``` shell
    cd path/to/wamr/root
    clang-format-12 --style file -i path/to/file
    ```

@tonibofarull
Copy link
Contributor Author

@tonibofarull The coding guideline CI check failed for wasi_nn.c, could you use clang-format-12 to format the file?

I was using the general version (no -12).

@wenyongh wenyongh merged commit 9eed668 into bytecodealliance:main Jan 25, 2023
@tonibofarull tonibofarull deleted the wasi-nn-update branch January 25, 2023 10:53
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…ecodealliance#1834)

- Reorganize the library structure
- Use the latest version of `wasi-nn` wit (Oct 25, 2022):
    https://github.com/WebAssembly/wasi-nn/blob/0f77c48ec195748990ff67928a4b3eef5f16c2de/wasi-nn.wit.md
- Split logic that converts WASM structs to native structs in a separate file
- Simplify addition of new frameworks
yamt added a commit to yamt/wasm-micro-runtime that referenced this pull request Jun 10, 2025
to me, the comment doesn't seem to make sense even in the PR where
it originally has been introduced:
bytecodealliance#1834
probably it was a leftover from unpublished earlier versions?
yamt added a commit to yamt/wasm-micro-runtime that referenced this pull request Jun 10, 2025
to me, the comment doesn't seem to make sense even in the PR where
it originally has been introduced:
bytecodealliance#1834
probably it was a leftover from unpublished earlier versions?
yamt added a commit to yamt/wasm-micro-runtime that referenced this pull request Jun 11, 2025
to me, the comment doesn't seem to make sense even in the PR where
it originally has been introduced:
bytecodealliance#1834
probably it was a leftover from unpublished earlier versions?
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.

3 participants