Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Device selection criteria for usecase-driven scenarios

Abierto
#902 11 comentarios 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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... 📋

Lenguaje dominante
Bikeshed
Estrellas
566
Forks
72
Merge medio
6 d 5 h
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de webmachinelearning/webnn

Todos los issues de webmachinelearning/webnn

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.