onnxruntime
30c3dc47 - [WebNN EP] Reuse shared WASM loader for Blob-backed external data (#31151)

Commit
40 days ago
[WebNN EP] Reuse shared WASM loader for Blob-backed external data (#31151) ### Description Extend the Blob-backed on-demand external data loading (#29477) from CPU / WebGPU EP to the WebNN EP. Route WebNN external initializers through `LoadWebAssemblyExternalData` instead of the custom `webnnRegisterMLConstant` path: `RegisterConstant` streams each initializer's byte range into a scratch buffer and builds the constant via the existing in-memory path. ### Motivation and Context - Load-time memory (JSPI): the range is read from the mounted Blob on demand and released right after copy, so JS heap peak drops from full model size to the largest single initializer (same win as #29477). - Fixes int32 offset/size truncation (loader uses `double/SafeInt<size_t>`), so big models split across multiple `.data` files load correctly. - Removes the WebNN constant glue (`webnnRegisterMLConstant`, `registerMLConstant`, etc.).
Author
Parents
Loading