Skip to content

Close translation parity gaps - #16

Merged
jamestjsp merged 46 commits into
mainfrom
codex/translation-parity-gaps
May 10, 2026
Merged

Close translation parity gaps#16
jamestjsp merged 46 commits into
mainfrom
codex/translation-parity-gaps

Conversation

@jamestjsp

Copy link
Copy Markdown
Owner

Summary

  • Add Fortran-reference parity coverage for high-risk translated SLICOT routines across AB, IB, MB, SB, SG, and TG families.
  • Fix translation mismatches in MB01UY, MB02CU, MB03BD, MB03LF/MB04CD, and MB04QC-related paths.
  • Refresh the translation gap audit and mark resolved parity backlog items complete.

Validation

  • .venv/bin/pytest tests/python/ -n auto --reruns 2 --only-rerun "worker .* crashed"
  • scripts/check_translation_coverage.py --report-only
  • scripts/check_translation_smells.py
  • Release native benchmark comparison against origin/main with fresh Meson builds: 13/13 benchmarks passed on both; no clear performance degradation requiring a code change.

Notes

  • Existing branch benchmark outliers had matching or near-matching minimum timings, consistent with run noise rather than a branch regression.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f99cf44a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/MB/mb04cd.c Outdated
f64 *d0 = orig + 2 * nn;
f64 *tmp = orig + 3 * nn;

SLC_DGEMM("T", "N", &n, &n, &n, &ONE, q3, &ldq3, a0, &lda, &ZERO, tmp, &n);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use packed leading dimensions when recomputing outputs

In the new recompute_outputs path, a0/b0/d0 are stored as packed n x n buffers (orig), but the GEMM calls still pass lda/ldb/ldd as the leading dimensions (for example at a0 on this line). When any leading dimension is greater than n, this makes BLAS read the packed buffer with the wrong stride, which can produce incorrect transformed matrices or out-of-bounds reads/crashes for valid inputs (COMPQ1=COMPQ2=COMPQ3='I' with padded leading dimensions).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 316e8eb by copying the original A/B/D inputs into packed buffers with DLACPY using the caller leading dimensions, then using n as the packed buffer leading dimension in the recompute GEMMs. Added a ctypes regression that calls mb04cd directly with padded lda/ldb/ldd; tests/python/test_mb04cd.py passes locally.

@jamestjsp
jamestjsp merged commit b518167 into main May 10, 2026
3 checks passed
@jamestjsp
jamestjsp deleted the codex/translation-parity-gaps branch May 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant