microsoft / microsoft/onnxruntime
[Web] WebGPU Device Promise not defined
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the issue
#23026 changes the API to define `device` as a Promise that, when awaited, returns the GPUDevice for the backend. However, that promise is never set (if you try to access `device` before initializing an inference session, it's just `undefined`). Similarly, if you `set` the `device`, it just gets overwritten. #21553 added code to implement this but it didn't end up getting merged...
Has anyone been looking into implementing the behavior described by the API?
@fs-eire
### To reproduce
`await ort.env.webgpu.device` at the beginning of your web app's execution.
### Urgency
_No response_
### ONNX Runtime Installation
Released Package
### ONNX Runtime Version or Commit ID
1.22.0
### Execution Provider
'webgpu' (WebGPU)
Contributor guide
Assessment
This issue has not been assessed yet.