mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #2347] F16-UNARY-CASES-16BIT-MASKING-AND-REF-TESTS #2351
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#2351
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/2347
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/f16-unary-cases-mask-safety📝 Commits (1)
fe13137F16-UNARY-CASES-16BIT-MASKING-AND-REF-TESTS📊 Changes
2 files changed (+103 additions, -0 deletions)
View changed files
📝
tests/semantic/f16_unary_cases.py(+10 -0)➕
tests/test_f16_unary_cases.py(+93 -0)📄 Description
Claimed in the coordination issue as: F16-UNARY-CASES-16BIT-MASKING-AND-REF-TESTS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194729737)
What and why
h &= 0xFFFFat the entry ofref_rcp,ref_sqrt,ref_rsq, andref_fractintests/semantic/f16_unary_cases.pyso upper bits in 32-bit test words do not leak past NaN checks (0x17E01 | 0x7E00) or bypass the+inf/-0exact comparisons (0x17C00triggeringOverflowErrorinFraction(...)).exact_sqrt_ratio(num, den, k=64)domain parameters up front (num >= 0,den > 0,k >= 0, rejecting booleans and non-integers withValueError).tests/test_f16_unary_cases.py.Tested
python -I tests/test_f16_unary_cases.py -v: 3 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails: 9 failures, 3 errors across subtests).test_valu_fract_f16,test_valu_pack_b32_f16,test_valu_rcp_f16,test_valu_rsq_f16,test_valu_sqrt_f16): 46 passed, 0 failed.python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q tests/semantic/f16_unary_cases.py tests/test_f16_unary_cases.py, andgit diff --cached --check: passed.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.