Build notes: both upstream changes are merged
Browse files- BUILD_INFO.md +14 -13
BUILD_INFO.md
CHANGED
|
@@ -2,27 +2,28 @@
|
|
| 2 |
|
| 3 |
`executorch_wasm_lib.js` and `executorch_wasm_lib.wasm` are the ExecuTorch Wasm
|
| 4 |
bindings (`extension/wasm`) with the WebGPU backend, linked into one web bundle.
|
|
|
|
|
|
|
|
|
|
| 5 |
Every demo in the playground shares this one runtime (`src/runtime/executorch.js`).
|
| 6 |
The JS file defines `createExecuTorch()`. After `await et.initWebGPU()`, a `.pte`
|
| 7 |
loads with `et.Module.load(path)` and `loadMethod('forward')`, and runs with an
|
| 8 |
async `forward([tensors])`.
|
| 9 |
|
| 10 |
-
##
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
1.
|
| 16 |
-
|
| 17 |
-
2.
|
| 18 |
-
|
| 19 |
-
(`tokens` of shape `[1, n]` with 1 < n < 512) fails with
|
| 20 |
-
`add(resize): operands are not broadcast-compatible`.
|
| 21 |
|
| 22 |
-
|
| 23 |
-
files. The emdawnwebgpu override (`EXECUTORCH_WEBGPU_EMDAWNWEBGPU_PORT`) was only
|
| 24 |
-
needed because the build machine could not reach GitHub
|
| 25 |
-
|
| 26 |
|
| 27 |
## Toolchain
|
| 28 |
|
|
|
|
| 2 |
|
| 3 |
`executorch_wasm_lib.js` and `executorch_wasm_lib.wasm` are the ExecuTorch Wasm
|
| 4 |
bindings (`extension/wasm`) with the WebGPU backend, linked into one web bundle.
|
| 5 |
+
The `.js` loader ships in this folder. The `.wasm` is hosted on Hugging Face
|
| 6 |
+
(`executorch-community/ExecuTorch-WebGPU-Runtime`, pinned in `src/config/runtime.js`),
|
| 7 |
+
downloaded and checked against the sha256 below like a model file.
|
| 8 |
Every demo in the playground shares this one runtime (`src/runtime/executorch.js`).
|
| 9 |
The JS file defines `createExecuTorch()`. After `await et.initWebGPU()`, a `.pte`
|
| 10 |
loads with `et.Module.load(path)` and `loadMethod('forward')`, and runs with an
|
| 11 |
async `forward([tensors])`.
|
| 12 |
|
| 13 |
+
## Source
|
| 14 |
|
| 15 |
+
Built from the ExecuTorch source tree of 2026-10-16 (`version.txt` 1.6.0) with the two
|
| 16 |
+
changes that make WebGPU run in the Wasm build, both merged upstream:
|
| 17 |
|
| 18 |
+
1. pytorch/executorch#23938: the `EXECUTORCH_BUILD_WASM_WEBGPU` option, which links the
|
| 19 |
+
WebGPU backend into `extension/wasm`, and the `initWebGPU()` binding.
|
| 20 |
+
2. pytorch/executorch#23914: `WebGPUGraph::propagate_resize` resizes every operand before
|
| 21 |
+
its consumer in one pass, so a multi-token LLM prefill works.
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
A build from ExecuTorch main that contains both, with the commands below, should give the
|
| 24 |
+
same files. The emdawnwebgpu override (`EXECUTORCH_WEBGPU_EMDAWNWEBGPU_PORT`) was only
|
| 25 |
+
needed because the build machine could not reach GitHub; without it, Emscripten downloads
|
| 26 |
+
the same emdawnwebgpu version itself.
|
| 27 |
|
| 28 |
## Toolchain
|
| 29 |
|