Record/replay: experiment with recording nondeterministic NaNs

Abierto
#15,461 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust, wasm

Línea de trabajo

Read the ongoing record/replay work in #15412 and investigate where FP NaN canonicalization currently occurs. Explore recording and replaying floating point values at those points, measuring both runtime overhead and trace size against the existing approach. Done means identifying an approach that preserves non-canonical NaN bit patterns during replay while keeping those costs manageable.

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

Descripción

In the current R/R work (#15412 and ongoing), we handle FP NaN values by enabling NaN canonicalization, so replay on any host (possibly a different ISA than the recording host) gets the same, bit-identical, values.

This works for all use-cases that require determinism, but it does potentially change the recorded execution with respect to one without canonicalization, if the recording host normally produces non-canonical NaNs. In some debugging scenarios, the user might need to diagnose (and replay) an issue that specifically has to do with non-canonical bit patterns.

We should support an alternative mode where we instead record every FP value that passes through the program (or at least, at points where we currently do canonicalization), and replay those values from the trace.

The main concerns with this approach are performance and trace size: we generally get low recording overhead by recording only what happens "at the boundary" and letting execution within the sandbox run unimpeded. This instead inserts some logic in the hot path of every bit of FP code (including e.g. every iteration of a hot matmul loop or whatever). That could also potentially bloat the trace significantly, if the program does heavy FP computation but relatively little IO (e.g., many physics, graphics, or other numeric programs). The challenge is thus to find a way to optimize this as much as possible.

Lenguaje dominante
Rust
Estrellas
18.9k
Forks
2k
Merge medio
1 d 6 h
PR fusionados (30 d)
238

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 bytecodealliance/wasmtime

Todos los issues de bytecodealliance/wasmtime

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.