-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
ep:WebGPUort-web webgpu providerort-web webgpu providerplatform:webissues related to ONNX Runtime web; typically submitted using templateissues related to ONNX Runtime web; typically submitted using template
Description
Describe the issue
I successfully built the ONNXRuntime as a static library for WebAssembly (with pretty much this approach).
I log all available execution providers like so:
printf("ONNX Runtime version: %s\n", OrtGetApiBase()->GetVersionString());
auto providers = Ort::GetAvailableProviders();
printf("Available execution providers:\n");
for (const auto& provider : providers) {
printf(" %s\n", provider.c_str());
}
And it correctly prints
ONNX Runtime version: 1.23.0
Available execution providers:
WebGpuExecutionProvider
CPUExecutionProvider
However, when running, it seems to be using the CPUExecutionProvider? I'm not actually sure, just speed-wise this seems to be the case.
So my questions are:
- How can I actually check which EP is used (not just which ones are available)
- How can I force it to use the WebGpuExecutionProvider, and raise an exception otherwise?
To reproduce
Urgency
Somewhat, my bachelors thesis would highly benefit from it lol
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
Execution Provider
'webgpu' (WebGPU)
Metadata
Metadata
Assignees
Labels
ep:WebGPUort-web webgpu providerort-web webgpu providerplatform:webissues related to ONNX Runtime web; typically submitted using templateissues related to ONNX Runtime web; typically submitted using template