Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js/web] remove training release #22103

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions js/web/lib/backend-wasm-inference.ts

This file was deleted.

29 changes: 0 additions & 29 deletions js/web/lib/backend-wasm-training.ts

This file was deleted.

2 changes: 2 additions & 0 deletions js/web/lib/backend-wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ export class OnnxruntimeWebAssemblyBackend implements Backend {
return Promise.resolve(handler);
}
}

export const wasmBackend = new OnnxruntimeWebAssemblyBackend();
4 changes: 1 addition & 3 deletions js/web/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ if (!BUILD_DEFS.DISABLE_WEBGL) {
}

if (!BUILD_DEFS.DISABLE_WASM) {
const wasmBackend = BUILD_DEFS.DISABLE_TRAINING
? require('./backend-wasm-inference').wasmBackend
: require('./backend-wasm-training').wasmBackend;
const wasmBackend = require('./backend-wasm').wasmBackend;
if (!BUILD_DEFS.DISABLE_JSEP) {
registerBackend('webgpu', wasmBackend, 5);
registerBackend('webnn', wasmBackend, 5);
Expand Down
198 changes: 0 additions & 198 deletions js/web/lib/wasm/session-handler-training.ts

This file was deleted.

9 changes: 4 additions & 5 deletions js/web/lib/wasm/wasm-core-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import { loadFile } from './wasm-utils-load-file';
* Refer to web/lib/index.ts for the backend registration.
*
* 2. WebAssembly artifact initialization.
* This happens when any registered wasm backend is used for the first time (ie. `ort.InferenceSession.create()` or
* `ort.TrainingSession.create()` is called). In this step, onnxruntime-web does the followings:
* This happens when any registered wasm backend is used for the first time (ie. `ort.InferenceSession.create()` is
* called). In this step, onnxruntime-web does the followings:
* - create a proxy worker and make sure the proxy worker is ready to receive messages, if proxy is enabled.
* - perform feature detection, locate correct WebAssembly artifact path and call the Emscripten generated
* JavaScript code to initialize the WebAssembly runtime.
Expand All @@ -57,9 +57,8 @@ import { loadFile } from './wasm-utils-load-file';
* - logging level (ort.env.logLevel) and thread number (ort.env.wasm.numThreads) are set in this step.
*
* 4. Session initialization.
* This happens when `ort.InferenceSession.create()` or `ort.TrainingSession.create()` is called. Unlike the first 3
* steps (they only called once), this step will be done for each session. In this step, onnxruntime-web does the
* followings:
* This happens when `ort.InferenceSession.create()` is called. Unlike the first 3 steps (they only called once),
* this step will be done for each session. In this step, onnxruntime-web does the followings:
* If the parameter is a URL:
* - download the model data from the URL.
* - copy the model data to the WASM heap. (proxy: 'copy-from')
Expand Down
Loading
Loading