Skip to content

feat: added webgpu tensorflow example#579

Draft
MendyBerger wants to merge 1 commit intowasmCloud:v2from
MendyBerger:tfjs-example
Draft

feat: added webgpu tensorflow example#579
MendyBerger wants to merge 1 commit intowasmCloud:v2from
MendyBerger:tfjs-example

Conversation

@MendyBerger
Copy link

Adds a TensorFlow.js example running on top of wasi:webgpu

Needed before merging:

[ ] next wash v2 rc (needs webgpu adapter info)
[ ] replace wit-deps with wkg WebAssembly/wasi-gfx#63
[ ] investigate a memory leak at the end of encoding
[ ] investigate pretty major performance regression while refactor/cleanup
[ ] slightly better ui with example image

Other external PRs that would allow removing some hacks here:

[ ] unjs/unenv#540
[ ] tensorflow/tfjs#8639
[ ] bytecodealliance/ComponentizeJS#324

Other comments

  • location.search is polyfiled to an empty string because tf assumes that's it's available.
  • navigator.gpu is first set to empty an object at initialization so that the check if webgpu is available succeeds, and is later at runtime overridden with the real gpu object from wasi-gfx-js

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