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] Allow passing Uint8ClampedArray to ort.Tensor() #21753

Closed
eyaler opened this issue Aug 15, 2024 · 2 comments · Fixed by #21985
Closed

[Web] Allow passing Uint8ClampedArray to ort.Tensor() #21753

eyaler opened this issue Aug 15, 2024 · 2 comments · Fixed by #21985
Assignees
Labels
ep:WebGPU ort-web webgpu provider platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@eyaler
Copy link

eyaler commented Aug 15, 2024

Describe the issue

ort.Tensor() does not accecpt Uint8ClampedArray and will result with an error. One must explicitly covert to Uint8Array as in new ort.Tensor(Uint8Array.from(clamped)). This defied my expectation to be able to use either.

To reproduce

new ort.Tensor(new Uint8ClampedArray(1))

Urgency

not urgent

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

https://cdn.jsdelivr.net/npm/[email protected]/dist/esm/ort.webgpu.min.js

Execution Provider

'webgpu' (WebGPU)

@eyaler eyaler added the platform:web issues related to ONNX Runtime web; typically submitted using template label Aug 15, 2024
@github-actions github-actions bot added .NET Pull requests that update .net code ep:WebGPU ort-web webgpu provider labels Aug 15, 2024
@sophies927 sophies927 removed the .NET Pull requests that update .net code label Aug 15, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Aug 29, 2024

@prathikr could you help to take a look?

@fs-eire
Copy link
Contributor

fs-eire commented Sep 12, 2024

The feature is merged in main branch and it's expected to be available in the next dev build or 1.20 release.

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

Successfully merging a pull request may close this issue.

4 participants