Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Device selection criteria for usecase-driven scenarios

Aperta
#902 11 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
8/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma

Direzione di ricerca

This is a design discussion in the WebNN spec repository with no named files or tests. Start with the linked comment on pull request #895 and the existing MLPowerPreference and MLContextOptions::accelerated options, then compare them against the scenario table. Done means a written proposal for how intent attributes map to device selection, agreed in the discussion, and the discussion has been quiet for about nine months.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

policy selection

WebNN has been moving away from explicit device selection (explicitly stating the device kind - GPU/NPU/CPU) more in favor describing the intent and expectations of the workload (currently limited to MLPowerPreference and whether to request an MLContextOptions::accelerated device), but there may be more complex scenarios where we want to be more explicit, or cases where we want to be less explicit to let WebNN or the backends choose the device based on intent.

For example, some independent attributes that could contribute to device selection include aspects like: how big a workload is, how immediately you want the result (a GPU can finish a large load faster than the CPU, but when desiring small latency with small workloads, the CPU is often better), whether it's continuous repeating work or single shot, desired power usage...

  • acceptable latency: low, medium, high
  • continuity: continuous, moderate, single shot
  • workload size: small, medium, large
  • power usage: low, medium, high
  • ...

e.g.

App scenarios preferred latency workload size continuity ideal device
Realtime audio filtering low small continuous CPU/NPU (not GPU due to overhead of readback time)
Audio to text ignorable medium continuous Any
Realtime video processing low large continuous GPU (since likely to be displayed afterward anyway)
Offline video processing ignorable large continuous GPU/NPU (since large continuous workload)
Image generation medium large multiple executions GPU/NPU (much faster than CPU)
Image recognition ignorable small single execution Any (CPU is fast enough for simple recognition)
Code editor prediction low small single execution CPU since small workload and want to avoid pegging the GPU while typing

(conceptually it's kind of like the font selection problem - family & weight & width & slope ...)

Seeding this discussion @anssiko for user feedback... 📋

Lingua principale
Bikeshed
Stelle
566
Fork
72
Merge medio
6g 5h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webmachinelearning/webnn

Tutte le issue di webmachinelearning/webnn

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.