microsoft / microsoft/onnxruntime

[Feature Request] [Web] User Module Workers if available in the runtime

Open
#16,800 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request platform:web
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

I'm guessing that Classic Workers are still used to support old browsers, but I'm wondering if it's possible to use Module Workers if it's detected that the runtime supports them?

### Describe scenario use case

This would allow multi-threading to be used in Deno. Currently `ort.env.wasm.numThreads=1` must be used, else this error is thrown:
```
error: Uncaught (in promise) NotSupported: Classic workers are not supported.
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how ONNX Runtime Web creates workers and how ort.env.wasm.numThreads is handled when running in Deno. Investigate runtime detection for Module Workers, then verify that multithreading no longer produces the reported Classic workers error.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.