diff --git a/js/common/lib/inference-session.ts b/js/common/lib/inference-session.ts index edc32535fc..1221b52cd4 100644 --- a/js/common/lib/inference-session.ts +++ b/js/common/lib/inference-session.ts @@ -181,7 +181,7 @@ export declare namespace InferenceSession { // Currently, we have the following backends to support execution providers: // Backend Node.js binding: supports 'cpu' and 'cuda'. - // Backend WebAssembly: supports 'cpu', 'wasm', 'xnnpack' and 'webnn'. + // Backend WebAssembly: supports 'cpu', 'wasm', 'webgpu' and 'webnn'. // Backend ONNX.js: supports 'webgl'. // Backend React Native: supports 'cpu', 'xnnpack', 'coreml' (iOS), 'nnapi' (Android). interface ExecutionProviderOptionMap { diff --git a/js/web/lib/index.ts b/js/web/lib/index.ts index 4f1a3943de..baf45e74ad 100644 --- a/js/web/lib/index.ts +++ b/js/web/lib/index.ts @@ -26,11 +26,8 @@ if (!BUILD_DEFS.DISABLE_WASM) { } registerBackend('cpu', wasmBackend, 10); registerBackend('wasm', wasmBackend, 10); - if (BUILD_DEFS.DISABLE_TRAINING) { - registerBackend('xnnpack', wasmBackend, 9); - if (!BUILD_DEFS.DISABLE_WEBNN) { - registerBackend('webnn', wasmBackend, 9); - } + if (!BUILD_DEFS.DISABLE_WEBNN) { + registerBackend('webnn', wasmBackend, 9); } } diff --git a/js/web/lib/wasm/session-options.ts b/js/web/lib/wasm/session-options.ts index 45ea48a2df..41ab2d52ca 100644 --- a/js/web/lib/wasm/session-options.ts +++ b/js/web/lib/wasm/session-options.ts @@ -60,9 +60,6 @@ const setExecutionProviders = // check EP name switch (epName) { - case 'xnnpack': - epName = 'XNNPACK'; - break; case 'webnn': epName = 'WEBNN'; if (typeof ep !== 'string') { diff --git a/js/web/script/test-runner-cli-args.ts b/js/web/script/test-runner-cli-args.ts index fc74adfed1..8f6c5f6f04 100644 --- a/js/web/script/test-runner-cli-args.ts +++ b/js/web/script/test-runner-cli-args.ts @@ -36,7 +36,6 @@ Options: webgl webgpu wasm - xnnpack webnn -e=<...>, --env=<...> Specify the environment to run the test. Should be one of the following: chrome (default) @@ -111,7 +110,7 @@ Examples: export declare namespace TestRunnerCliArgs { type Mode = 'suite0'|'suite1'|'model'|'unittest'|'op'; - type Backend = 'cpu'|'webgl'|'webgpu'|'wasm'|'onnxruntime'|'xnnpack'|'webnn'; + type Backend = 'cpu'|'webgl'|'webgpu'|'wasm'|'onnxruntime'|'webnn'; type Environment = 'chrome'|'edge'|'firefox'|'electron'|'safari'|'node'|'bs'; type BundleMode = 'dev'|'perf'; type IOBindingMode = 'none'|'gpu-tensor'|'gpu-location'; @@ -378,13 +377,13 @@ export function parseTestRunnerCliArgs(cmdlineArgs: string[]): TestRunnerCliArgs } // Option: -b=<...>, --backend=<...> - const browserBackends = ['webgl', 'webgpu', 'wasm', 'xnnpack', 'webnn']; + const browserBackends = ['webgl', 'webgpu', 'wasm', 'webnn']; // TODO: remove this when Chrome support WebNN. // we need this for now because Chrome does not support webnn yet, // and ChromeCanary is not in CI. - const defaultBrowserBackends = ['webgl', 'webgpu', 'wasm', 'xnnpack' /*, 'webnn'*/]; + const defaultBrowserBackends = ['webgl', 'webgpu', 'wasm' /*, 'webnn'*/]; const nodejsBackends = ['cpu', 'wasm']; const backendArgs = args.backend || args.b; const backend = (typeof backendArgs !== 'string') ? (env === 'node' ? nodejsBackends : defaultBrowserBackends) : diff --git a/js/web/test/test-runner.ts b/js/web/test/test-runner.ts index 3492c8f378..442cb1bcf1 100644 --- a/js/web/test/test-runner.ts +++ b/js/web/test/test-runner.ts @@ -96,7 +96,7 @@ async function loadTensors( const outputs: Test.NamedTensor[] = []; let dataFileType: 'none'|'pb'|'npy' = 'none'; - const allowInt64 = ['wasm', 'xnnpack', 'webgpu', 'webnn'].includes(backendName); + const allowInt64 = ['wasm', 'webgpu', 'webnn'].includes(backendName); for (const dataFile of testCase.dataFiles) { const ext = extname(dataFile); @@ -317,7 +317,7 @@ export class TensorResultValidator { } else if (backend === 'webgpu') { this.absoluteThreshold = WEBGPU_THRESHOLD_ABSOLUTE_ERROR; this.relativeThreshold = WEBGPU_THRESHOLD_RELATIVE_ERROR; - } else if (backend === 'wasm' || backend === 'xnnpack' || backend === 'webnn') { + } else if (backend === 'wasm' || backend === 'webnn') { this.absoluteThreshold = WASM_THRESHOLD_ABSOLUTE_ERROR; this.relativeThreshold = WASM_THRESHOLD_RELATIVE_ERROR; } else if (backend === 'onnxruntime') { diff --git a/tools/ci_build/github/azure-pipelines/templates/win-web-ci.yml b/tools/ci_build/github/azure-pipelines/templates/win-web-ci.yml index 8d4efc79ea..8ba3517530 100644 --- a/tools/ci_build/github/azure-pipelines/templates/win-web-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/win-web-ci.yml @@ -169,12 +169,12 @@ jobs: errorActionPreference: stop displayName: 'Pack NPM packages' - script: | - npm test -- -e=chrome -b=webgl,wasm,xnnpack + npm test -- -e=chrome -b=webgl,wasm workingDirectory: '$(Build.SourcesDirectory)\js\web' - displayName: 'Run ort-web tests (wasm,webgl,xnnpack backend)' + displayName: 'Run ort-web tests (wasm,webgl backend)' condition: eq('${{ parameters.RunWebGpuTests }}', 'false') - script: | - npm test -- -e=chrome -b=webgl,wasm,xnnpack,webgpu $(webgpuCommandlineExtraFlags) + npm test -- -e=chrome -b=webgl,wasm,webgpu $(webgpuCommandlineExtraFlags) workingDirectory: '$(Build.SourcesDirectory)\js\web' displayName: 'Run ort-web tests (ALL backends)' condition: eq('${{ parameters.RunWebGpuTests }}', 'true') diff --git a/tools/ci_build/github/azure-pipelines/templates/win-web-multi-browsers.yml b/tools/ci_build/github/azure-pipelines/templates/win-web-multi-browsers.yml index f7876f1502..31ee488318 100644 --- a/tools/ci_build/github/azure-pipelines/templates/win-web-multi-browsers.yml +++ b/tools/ci_build/github/azure-pipelines/templates/win-web-multi-browsers.yml @@ -68,15 +68,15 @@ jobs: workingDirectory: '$(Build.SourcesDirectory)\js\web' displayName: 'npm ci /js/web/' - script: | - npm test -- suite0 -b=wasm,webgl,xnnpack --wasm-init-timeout=30000 --file-cache + npm test -- suite0 -b=wasm,webgl --wasm-init-timeout=30000 --file-cache workingDirectory: '$(Build.SourcesDirectory)\js\web' displayName: 'npm test (Suite0, Chrome)' - script: | - npm test -- suite0 -b=wasm,webgl,xnnpack --env=firefox --wasm-init-timeout=30000 --file-cache + npm test -- suite0 -b=wasm,webgl --env=firefox --wasm-init-timeout=30000 --file-cache workingDirectory: '$(Build.SourcesDirectory)\js\web' displayName: 'npm test (Suite0, Firefox)' - script: | - npm test -- suite0 -b=wasm,webgl,xnnpack --env=edge --wasm-init-timeout=30000 --file-cache + npm test -- suite0 -b=wasm,webgl --env=edge --wasm-init-timeout=30000 --file-cache workingDirectory: '$(Build.SourcesDirectory)\js\web' displayName: 'npm test (Suite0, Edge)' - task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3