onnxruntime/js/web/lib/wasm
Enrico Galli 1e5bda88f0
[WebNN EP] Cache MLTensors between runs (#22278)
### Description
This change enables caching `MLTensor`s between inferences runs. This is
done by keeping a reference to `MLTensor`s alive after they have been
released. `MLTensor`s are only destroyed once the sessions goes out of
scope.

### Motivation and Context
Creating and destroying `MTensor`s on every run has a non-trivial
performance penalty. This performance penalty materializes when using
`ort.Tensors`[location=cpu] for inputs/outputs or when using the CPU EP
as a fallback EP for unsupported operators. The former could be
mitigated by developer using `ort.Tensors`[location=ml-tensor]. The
latter cannot be mitigated by developers.
2024-10-18 08:07:00 -07:00
..
jsep [WebNN EP] Cache MLTensors between runs (#22278) 2024-10-18 08:07:00 -07:00
proxy-worker [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
proxy-messages.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
proxy-wrapper.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
run-options.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
session-handler-inference.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
session-options.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
wasm-common.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
wasm-core-impl.ts [WebNN EP] Remove the numThreads option (#22464) 2024-10-17 07:45:39 -07:00
wasm-factory.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
wasm-types.ts [WebNN EP] Enable IO Bindings with MLTensor (#21301) 2024-09-27 17:24:21 -07:00
wasm-utils-env.ts [js/web] optimize module export and deployment (#20165) 2024-05-20 09:51:16 -07:00
wasm-utils-import.ts [js/web] remove training release (#22103) 2024-09-16 10:56:22 -07:00
wasm-utils-load-file.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
wasm-utils.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00