microsoft / microsoft/onnxruntime

[Web] WebGPU Device Promise not defined

Open
#25,324 2 comments 0 reactions 1 assignee Claimed by @fs-eire View on GitHub
ep:WebGPU platform:web
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.