Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web] Inference session cannot be created with SharedArrayBuffer, only ArrayBuffer is accepted #23148

Open
nomagick opened this issue Dec 19, 2024 · 2 comments
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@nomagick
Copy link

nomagick commented Dec 19, 2024

Describe the issue

Inference session cannot be created with SharedArrayBuffer, only ArrayBuffer is accepted

TypeError: Invalid argument: args has to be either (modelPath, options) or (buffer, byteOffset, byteLength, options).

To reproduce

Load any model with SharedArrayBuffer

Urgency

high

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

  • onnxruntime-node 1.20.1

Execution Provider

'wasm'/'cpu' (WebAssembly CPU)

@nomagick nomagick added the platform:web issues related to ONNX Runtime web; typically submitted using template label Dec 19, 2024
@nomagick
Copy link
Author

Bug here:

} else if (argsLength == 4 && info[0].IsArrayBuffer() && info[1].IsNumber() && info[2].IsNumber() &&

SharedArrayBuffer cannot be checked with ::IsArrayBuffer()

@nomagick
Copy link
Author

Related:
nodejs/node#23276
nodejs/node#23279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

1 participant