Skip to content

feat: added webgpu tensorflow example#579

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

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

Conversation

@MendyBerger
Copy link
Copy Markdown
Contributor

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

@ericgregory ericgregory deleted the branch wasmCloud:v2 April 16, 2026 14:35
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.

2 participants