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

[webgpu] backend not found when use onnxruntime-web #25397

Open
jlucaso1 opened this issue Sep 3, 2024 · 2 comments
Open

[webgpu] backend not found when use onnxruntime-web #25397

jlucaso1 opened this issue Sep 3, 2024 · 2 comments
Labels
bug Something isn't working correctly node compat webgpu WebGPU API

Comments

@jlucaso1
Copy link

jlucaso1 commented Sep 3, 2024

Version: Deno 1.46.2

import { InferenceSession } from "npm:onnxruntime-web";

const modelFile = await Deno.readFile("./model.onnx");

InferenceSession.create(modelFile, {
  executionProviders: ["webgpu"],
});

DENO_FUTURE=1 deno run -A main.ts

The error:

error: Uncaught (in promise) Error: no available backend found. ERR: [webgpu] backend not found.
    at resolveBackendAndExecutionProviders (file:///home/jlucaso/.cache/deno/npm/registry.npmjs.org/onnxruntime-common/1.19.0/dist/esm/backend-impl.js:120:15)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async Function.create (file:///home/jlucaso/.cache/deno/npm/registry.npmjs.org/onnxruntime-common/1.19.0/dist/esm/inference-session-impl.js:180:52)
@lucacasonato lucacasonato added bug Something isn't working correctly webgpu WebGPU API node compat labels Sep 4, 2024
@av
Copy link

av commented Oct 24, 2024

To whomever discovers this issue from trying to use transformers.js v3 with Deno's WebGPU support with following errors:

error: Uncaught (in promise) Error: no available backend found. ERR: [webgpu] backend not found.
error: Uncaught (in promise) Error: Unsupported device: "webgpu". Should be one of: cuda, cpu.

This seems to be blocked by Deno's implementation of WebGPU in relation to the max buffer size format.

@wesbos
Copy link

wesbos commented Nov 28, 2024

Looks like the upstream issue was fixed yesterday.

Running Deno canary deno 2.1.2+8626ec7 and also trying to. use Transformers.js with WebGPU, seems it's still looking

Still getting and error:

error: Uncaught (in promise) Error: Unsupported device: "webgpu". Should be one of: cpu.

Does this mean transformers.js needs to update onnx runtime? cc @xenova

Edit: apologies, I understand Onnx runtime was blocked by a deno issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat webgpu WebGPU API
Projects
None yet
Development

No branches or pull requests

4 participants