onnxruntime/js/common/lib
Yulong Wang 9a61388f0a
[js/web] revise backend registration (#18715)
### Description
This PR revises the backend registration.

The following describes the expected behavior after this change:
(**bolded are changed behavior**)

- (ort.min.js - built without webgpu support)
    - loading: do not register 'webgpu' backend
- creating session without EP list: use default EP list ['webnn', 'cpu',
'wasm']
- creating session with ['webgpu'] as EP list: should fail with backend
not available
- (ort.webgpu.min.js - built with webgpu support)
    - loading: **always register 'webgpu' backend**
( previous behavior: only register 'webgpu' backend when `navigator.gpu`
is available)
- creating session without EP list: use default EP list ['webgpu',
'webnn', 'cpu', 'wasm']
        - when WebGPU is available (win): use WebGPU backend
- when WebGPU is unavailable (android): **should fail backend init,**
and try to use next backend in the list, 'webnn'
(previous behavior: does not fail backend init, but fail in JSEP init,
which was too late to switch to next backend)
    - creating session with ['webgpu'] as EP list
        - when WebGPU is available (win): use WebGPU backend
- when WebGPU is unavailable (android): **should fail backend init, and
because no more EP listed, fail.


related PRs: #18190 #18144
2023-12-20 14:45:55 -08:00
..
backend-impl.ts [js/web] revise backend registration (#18715) 2023-12-20 14:45:55 -08:00
backend.ts [js/web] revise backend registration (#18715) 2023-12-20 14:45:55 -08:00
env-impl.ts [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
env.ts [js/webgpu] allow to specify callback for profiling data (#18732) 2023-12-07 14:10:28 -08:00
index.ts Add training interfaces to js/common (#17333) 2023-09-29 19:05:10 -07:00
inference-session-impl.ts Add training interfaces to js/common (#17333) 2023-09-29 19:05:10 -07:00
inference-session.ts [WebNN EP] Support numThreads option for WebNN CPU device (#18054) 2023-11-12 16:45:10 -08:00
onnx-value.ts [js/api] introducing IO binding for tensor (#16452) 2023-08-29 12:58:26 -07:00
tensor-conversion-impl.ts [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
tensor-conversion.ts [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
tensor-factory-impl.ts [js/common] prepare work for supporting webgpu IO binding implementation (#17465) 2023-09-08 13:49:24 -07:00
tensor-factory.ts [js/common] prepare work for supporting webgpu IO binding implementation (#17465) 2023-09-08 13:49:24 -07:00
tensor-impl-type-mapping.ts [js/api] introducing IO binding for tensor (#16452) 2023-08-29 12:58:26 -07:00
tensor-impl.ts [js/common] prepare work for supporting webgpu IO binding implementation (#17465) 2023-09-08 13:49:24 -07:00
tensor-utils-impl.ts [js/api] introducing IO binding for tensor (#16452) 2023-08-29 12:58:26 -07:00
tensor-utils.ts [js/common] allow import onnxruntime-common as ESM and CJS (#15772) 2023-06-12 12:05:11 -07:00
tensor.ts [js/common] prepare work for supporting webgpu IO binding implementation (#17465) 2023-09-08 13:49:24 -07:00
training-session-impl.ts [js/web/training] lazyResetGrad implementation (#18711) 2023-12-11 17:36:54 -08:00
training-session.ts [js/web/training] lazyResetGrad implementation (#18711) 2023-12-11 17:36:54 -08:00
version.ts Bump Up Version to 1.17.0 (#17587) 2023-09-20 11:02:58 +08:00