deno icon indicating copy to clipboard operation
deno copied to clipboard

[webgpu] backend not found when use onnxruntime-web

Open jlucaso1 opened this issue 6 months ago • 1 comments

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)

jlucaso1 avatar Sep 03 '24 19:09 jlucaso1