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

[Feature Request] Native WebGPU Execution Provider #22077

Open
audioXD opened this issue Sep 12, 2024 · 4 comments
Open

[Feature Request] Native WebGPU Execution Provider #22077

audioXD opened this issue Sep 12, 2024 · 4 comments
Labels
ep:WebGPU ort-web webgpu provider feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@audioXD
Copy link

audioXD commented Sep 12, 2024

Describe the feature request

Request:
Leverage onnxruntime-web kernels to create a native WebGPU Execution Provider for non-web environments.

Story:
I am in a unique situation where my device supports Vulkan, but lacks support for ROCm and CUDA. In the related issue #21917, it seems that Vulkan support was requested, but the discussion appears to have stalled.

Given the progress I've seen with ONNX Runtime in the web environment, I was wondering if the development efforts on the web could be extended to implement a native C++ execution provider. A potential way to achieve this would be by using a library such as wgpu, or more specifically, wgpu-native, which would align well with ONNX Runtime's C++ codebase.

Describe scenario use case

GPUs with no support for ROCm or CUDA, such as older or lower-end GPUs, are currently unable to fully leverage ONNX Runtime's GPU acceleration on Linux. While Windows users have the option to utilize DirectML for GPU support, there is no equivalent solution available for Linux users in this category. These GPUs, while not capable of running ROCm or CUDA, often have Vulkan support, making them suitable candidates for a WebGPU-based execution provider. A native WebGPU Execution Provider would enable efficient ONNX model execution on these devices, particularly in Linux environments, greatly expanding compatibility across platforms without requiring specialized GPU hardware.

@audioXD audioXD added the feature request request for unsupported feature or enhancement label Sep 12, 2024
@github-actions github-actions bot added ep:DML issues related to the DirectML execution provider ep:ROCm questions/issues related to ROCm execution provider ep:WebGPU ort-web webgpu provider platform:web issues related to ONNX Runtime web; typically submitted using template labels Sep 12, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Sep 12, 2024

I am currently working on a native WebGPU solution that exactly targeting your requirement. Since it needs to rewrite the JavaScript kernels using C++, it may take a while.

@guschmue guschmue removed ep:DML issues related to the DirectML execution provider ep:ROCm questions/issues related to ROCm execution provider labels Sep 13, 2024
@ola-ableton
Copy link

This would be an incredibly valuable addition to ORT

@altunenes
Copy link

Life will be so much better when this comes..

@fs-eire
Copy link
Contributor

fs-eire commented Dec 12, 2024

The WebGPU EP is now in the main branch. currently it has limited operator implementation coverage, but we are working on it. Simply build onnxruntime with --use_webgpu and use AppendExecutionProvider("WebGPU", ...) in code.

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 feature request request for unsupported feature or enhancement platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

5 participants