mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
[WebNN] Remove wasm.currentContext check (#22886)
If a WebNN session is threw early, this check for `wasm.currentContext` will break all the following WebNN sessions, this often happens in npm tests.
This commit is contained in:
parent
0d00fc3130
commit
8a06f13301
1 changed files with 0 additions and 3 deletions
|
|
@ -291,9 +291,6 @@ export const createSession = async (
|
|||
const providerName = typeof provider === 'string' ? provider : provider.name;
|
||||
if (providerName === 'webnn') {
|
||||
wasm.shouldTransferToMLTensor = false;
|
||||
if (wasm.currentContext) {
|
||||
throw new Error('WebNN execution provider is already set.');
|
||||
}
|
||||
if (typeof provider !== 'string') {
|
||||
const webnnOptions = provider as InferenceSession.WebNNExecutionProviderOption;
|
||||
const context = (webnnOptions as InferenceSession.WebNNOptionsWithMLContext)?.context;
|
||||
|
|
|
|||
Loading…
Reference in a new issue