mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2064] test_cvt_norm_mods_probe: compute the expected f16 sweep once per op in FakeOracle (TEST-CVT-NORM-SWEEP-CACHE) #2070
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2070
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2064
Author: @amine23012004
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:test-cvt-norm-sweep-cache📝 Commits (1)
1847fa7test_cvt_norm_mods_probe: compute the expected f16 sweep once per op in FakeOracle📊 Changes
1 file changed (+12 additions, -1 deletions)
View changed files
📝
tests/test_cvt_norm_mods_probe.py(+12 -1)📄 Description
Claimed in the coordination issue as: TEST-CVT-NORM-SWEEP-CACHE
What and why
FakeOracle.runintests/test_cvt_norm_mods_probe.pycalledpr.expected_sweep_words(op)for every sweep kernel it ran. That function is the exact rational reference model over all 65,536 f16 inputs, about 1.2-1.6 s a call, and the fake runs cover many kernels (two ops, both waves, every VOP3 modifier, two halves, plus the MODE variants), several times per file. The file took 98 s on its own, and over 300 s when run next to other tests on a 4-core machine.This change computes the sweep once per op in a module-level cache (
_sweep_words). Each kernel still gets a sliced copy, so thebad_wordandwave64_diffmutations never reach the cache. The tool and its reference model are unchanged.The
checkjob runs the roughly 500 standard-library test files one after another under a 15-minute timeout, so this file used a noticeable share of it.Tested
python3 -I tests/test_cvt_norm_mods_probe.py: 14 tests OK, 98 s before, 22-24 s after on a busy machine, and 28 s before, 6 s after on an idle one (Linux, Python 3.14.8, Intel i7-8650U, CPU only). One sweep also measured at 1.23 s under Python 3.12.15, so this is not a 3.14 slowdown.python3 -m compileall -q,python3 -I scripts/check_no_game_data.py tests/test_cvt_norm_mods_probe.py,python3 -I tests/test_text_write_line_endings.py: OK.main9f9a7c5f; merges cleanly with #1638, which edits the same test file elsewhere.GPUs tested: n/a (test-only change, no GPU used)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.