Skip to content

[Web] WebGPU Device Promise not defined #25324

Open
@rgerd

Description

@rgerd

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:WebGPUort-web webgpu providerplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions