Record/replay: experiment with recording nondeterministic NaNs

Aperta
#15,461 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust, wasm

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Rust
Stelle
18.9k
Fork
2k
Merge medio
1g 6h
PR unite (30g)
238

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

Tutte le issue di bytecodealliance/wasmtime

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.