onnxruntime/js/web/lib/wasm
Caroline Zhu c373a808a2
Add "glue" between training WASM artifacts and training web (#17474)
### Description
* follows the packaging approach according to the design document
    * adds `ENABLE_TRAINING` boolean flag to `BUILD_DEFS`
    * modifies `package.json` to include training submodule
* modifies build script to handle, validate, and minimize training WASM
artifacts
* adds the binding for the new backend with training enabled & the new
training artifacts
    * adds training backend
    * edits `index.ts` to use training backend depending on `BUILD_DEFS`
    * edits `wasm-factory.ts` to use the training artifacts if necessary

### Motivation and Context
* we are in the process of adding web bindings to enable training. 
* Adding the "glue" to allow onnxruntime-web to use the training WASM
artifacts is required for this work.
* Since BUILD_DEFS is defined and used at build time, I thought that it
made sense to bundle the changes to building in the same PR.
#### Related work
* #16521 allowed for training artifacts to be built
* #17333 must be merged in before this one

---------

Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
2023-10-12 11:16:56 -07:00
..
binding [js/webgpu] support IO binding (#17480) 2023-09-29 11:24:42 -07:00
jsep [js/webgpu] revise uniform support (#17871) 2023-10-11 16:41:46 -07:00
proxy-worker [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
proxy-messages.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
proxy-wrapper.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
run-options.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00
session-handler.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
session-options.ts [js/webgpu] allow specify preferredLayout (#17756) 2023-10-02 21:25:12 -07:00
wasm-common.ts [js/webgpu] support IO binding (#17480) 2023-09-29 11:24:42 -07:00
wasm-core-impl.ts [js/webgpu] support IO binding (#17480) 2023-09-29 11:24:42 -07:00
wasm-factory.ts Add "glue" between training WASM artifacts and training web (#17474) 2023-10-12 11:16:56 -07:00
wasm-utils.ts [js/web] enable ONNX Runtime Web error messages in JS (#16335) 2023-06-15 09:45:41 -07:00