[PR #1498] [CLOSED] tools: f32_fuzz translator-oracle applies the omod KNOWN_DEVIATIONS the GPU path applies (FUZZ-F32-ORACLE-DEV) #1525

Closed
opened 2026-11-26 20:21:33 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1498
Author: @thiefyzheng
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: fix/f32-oracle-deviations


📝 Commits (1)

  • 262b177 tools: f32_fuzz translator-oracle applies the omod KNOWN_DEVIATIONS the GPU path applies (FUZZ-F32-ORACLE-DEV)

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 tools/f32_fuzz.py (+14 -1)

📄 Description

What

tools/f32_fuzz.py's translator-oracle check() path (line ~726) now consults the same KNOWN_DEVIATIONS rules the GPU-compare path already applies (line ~941): after the exact-match check fails, it asks each rule for an alternate expectation, classifies a hit as deviation:<name>, and counts/prints them per rule and op (known deviation omod_neg_zero x1: v_mul_legacy_f32). Match/mismatch verdicts and the undefined/skip accounting are untouched.

Why

The finding is @whoalin1's (coordination issue #14, 02:02Z, posted twice): the oracle path counted as a mismatch exactly the translator output that is measured hardware behavior — an active mul:2 turning a -0 result into +0, documented in docs/design.md's v_mul_legacy_f32 and output-modifier rows (native gfx1031/gfx1036 measurements: with IEEE off and f32 denormals flushed the omod is applied every time, and the 66 -0-result programs become +0). A differential fuzzer whose oracle path false-positives on documented-and-measured behavior trains people to ignore its output.

What I ran (CPU-only, current main lineage 3ff2a2adc, no GPU, no game files)

  • Seed 53 before: 1000 programs (seed 53): 936 match, 1 mismatch, 34 undefined in SPIR-V, 29 skipped + mismatch x1: v_mul_legacy_f32 (program 246, the finding's exact operands). After: 936 match, 0 mismatch, 34 undefined, 29 skipped + known deviation omod_neg_zero x1: v_mul_legacy_f32.
  • Regression sweep, seeds 1–30, before vs after: every summary line byte-identical (952 match, 0 mismatch… etc. per seed), zero new deviations, zero regressions — the classification only changes for the one program that hit the rule.
  • --self-test OK; tests/test_f32_fuzz.py — 29 tests OK (1 skipped, GPU).
  • scripts/check_no_game_data.py exit 0.

Not run

The GPU-compare path and any hardware oracle (no GPU needed or used; the path is untouched).

AI-assisted: a pi coding agent operated by the repo contributor ran the verification sweep and built the single-file diff; the finding is @whoalin1's.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1498 **Author:** [@thiefyzheng](https://github.com/thiefyzheng) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/f32-oracle-deviations` --- ### 📝 Commits (1) - [`262b177`](https://github.com/ubiquitarianism/leonida/commit/262b1771d8435599ab5d9fade681c0d850705fd3) tools: f32_fuzz translator-oracle applies the omod KNOWN_DEVIATIONS the GPU path applies (FUZZ-F32-ORACLE-DEV) ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/f32_fuzz.py` (+14 -1) </details> ### 📄 Description ## What `tools/f32_fuzz.py`'s translator-oracle `check()` path (line ~726) now consults the same `KNOWN_DEVIATIONS` rules the GPU-compare path already applies (line ~941): after the exact-match check fails, it asks each rule for an alternate expectation, classifies a hit as `deviation:<name>`, and counts/prints them per rule and op (`known deviation omod_neg_zero x1: v_mul_legacy_f32`). Match/mismatch verdicts and the undefined/skip accounting are untouched. ## Why The finding is @whoalin1's (coordination issue #14, 02:02Z, posted twice): the oracle path counted as a **mismatch** exactly the translator output that is measured hardware behavior — an active `mul:2` turning a `-0` result into `+0`, documented in docs/design.md's `v_mul_legacy_f32` and output-modifier rows (native gfx1031/gfx1036 measurements: with IEEE off and f32 denormals flushed the omod is applied every time, and the 66 `-0`-result programs become `+0`). A differential fuzzer whose oracle path false-positives on documented-and-measured behavior trains people to ignore its output. ## What I ran (CPU-only, current main lineage 3ff2a2adc, no GPU, no game files) - **Seed 53 before:** `1000 programs (seed 53): 936 match, 1 mismatch, 34 undefined in SPIR-V, 29 skipped` + `mismatch x1: v_mul_legacy_f32` (program 246, the finding's exact operands). **After:** `936 match, 0 mismatch, 34 undefined, 29 skipped` + `known deviation omod_neg_zero x1: v_mul_legacy_f32`. - **Regression sweep, seeds 1–30, before vs after:** every summary line byte-identical (`952 match, 0 mismatch…` etc. per seed), zero new deviations, zero regressions — the classification only changes for the one program that hit the rule. - `--self-test` OK; `tests/test_f32_fuzz.py` — 29 tests OK (1 skipped, GPU). - `scripts/check_no_game_data.py` exit 0. ## Not run The GPU-compare path and any hardware oracle (no GPU needed or used; the path is untouched). **AI-assisted**: a pi coding agent operated by the repo contributor ran the verification sweep and built the single-file diff; the finding is @whoalin1's. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:33 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1525
No description provided.