cs_lds_xchg64_ext: judge ds_or_rtn_b64's returned pair and ds_max_rtn_f32's two results apart #186

Open
github-bot wants to merge 1 commit from github-bot/gh-186 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:37 UTC · original
ubiquitarianism:old-pr/9918 → main · +15 −10 · 4 files · 1 commits · draft

Carried over from old PR 9918 by Sunkiller-qc in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9918, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
Sunkiller-qc: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Thanks for d578b48, great coverage. Two small gaps: the returned pair of ds_or_rtn_b64 wasn't judged, and XORing ds_max_rtn_f32's memory value with its returned value couldn't tell a swapped result apart. This fixes both within the 8-word dump (out[2] now also folds in the returned pair, out[7] is the returned value of ds_max_rtn_f32 alone, its memory word is folded into out[6]) and resolves the contradictory GPU-verified wording in design.md.

The new expected words were derived by hand from the header and haven't been re-run on a GPU, so a GPU run would be appreciated.

**@⁠Andretuta** on GitHub · 2026-11-24 02:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/186) `ubiquitarianism:old-pr/9918` → `main` · +15 −10 · 4 files · 1 commits · draft > Carried over from **old PR 9918** by `Sunkiller-qc` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9918`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `Sunkiller-qc`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Thanks for d578b48, great coverage. Two small gaps: the returned pair of ds_or_rtn_b64 wasn't judged, and XORing ds_max_rtn_f32's memory value with its returned value couldn't tell a swapped result apart. This fixes both within the 8-word dump (out[2] now also folds in the returned pair, out[7] is the returned value of ds_max_rtn_f32 alone, its memory word is folded into out[6]) and resolves the contradictory GPU-verified wording in design.md. The new expected words were derived by hand from the header and haven't been re-run on a GPU, so a GPU run would be appreciated.
Follow-up to d578b48.

- out[2] only covered the 64-bit element ds_or_rtn_b64 left, so a translation
  that returned the wrong pair (or nothing) still passed. The returned pair's
  low ^ high (0x0F0F00F0) is now folded in: 0xF00FF000 ^ 0x0F0F00F0 = 0xFF00F0F0.
- out[7] was the word ds_max_rtn_f32 left XOR the word it returned, which can't
  tell (+0.0 left, -0.0 returned) from the swapped result. The returned -0.0 is
  now stored on its own in out[7] (0x80000000), and the word left (+0.0) is
  folded into out[6] with ds_min_f32's (0x3FC00000 ^ 0 = 0x3FC00000), keeping
  the dump at the eight words the console prints.
- check.py and run_gpu_tests.py expect the new out[2].
- docs/design.md: the 64-bit exchange row said both "Not GPU-verified" and
  "GPU-checked by cs_lds_xchg64_ext.asm"; it now reads GPU-verified.

Not re-run on a GPU: the new expected words are derived from the header, as
the original ones were.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:48:01 +00:00
This pull request has changes conflicting with the target branch.
  • docs/design.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/186/head:github-bot/gh-186'
git switch 'github-bot/gh-186'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-186'
git switch 'github-bot/gh-186'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-186'
git switch 'github-bot/gh-186'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-186'
git switch 'main'
git merge --squash 'github-bot/gh-186'
git switch 'main'
git merge --ff-only 'github-bot/gh-186'
git switch 'main'
git merge 'github-bot/gh-186'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.