Skip to content

test: migrate blas/base/dsymv to ULP-based assertions - #15204

Open
Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-blas-base-dsymv
Open

Planeshifter wants to merge 1 commit into
developfrom
philipp/ulp-blas-base-dsymv

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Resolves a part of #11352.

Description

This pull request migrates the test suite for blas/base/dsymv from relative tolerance testing (EPS-scaled delta comparisons) to ULP (units in the last place) difference testing using @stdlib/assert/is-almost-same-value, per the RFC in #11352.

  • Replaces the isApprox helper's rtol/EPS/abs-based tolerance computation in test/test.dsymv.js and test/test.ndarray.js with isAlmostSameValue( actual, expected, ulp ).
  • Measures the tightest ULP bound agentically for each of the 8 fixture-driven test cases (row-major/column-major, varying strides, complex access patterns): all 10 isApprox call sites require only ULP = 0 (bit-exact agreement with the fixtures), confirmed deterministic across repeated test runs.

Related Issues

Questions

No.

Other

Only the package's test files were changed (test/test.dsymv.js and test/test.ndarray.js); no package.json changes were needed since @stdlib/assert/is-almost-same-value is resolved the same way the previously-used internal packages were. make test TESTS_FILTER=".*/blas/base/dsymv/.*" passes 103/103, run twice to confirm no FMA/architecture flakiness.

Checklist

AI Assistance

  • Yes

  • No

  • Code generation (e.g., when writing an implementation or fixing a bug)

  • Test/benchmark generation

  • Documentation (including examples)

  • Research and understanding

Disclosure

This PR was written by Claude Code, including studying prior-art ULP migrations (e.g., blas/base/drotm), converting the test files, and agentically measuring the minimum ULP bound for each test case.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01NMcKyjbbvhSjuJHYWDN12j


Generated by Claude Code

Resolves a part of #11352

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Sep 13, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/dsymv $\\color{green}470/470$
$\\color{green}+100.00\\%$
$\\color{green}75/75$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}470/470$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Sep 14, 2026
@kgryte
kgryte marked this pull request as ready for review September 14, 2026 23:35
@kgryte
kgryte requested a review from a team September 14, 2026 23:35
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Sep 14, 2026

Copy link
Copy Markdown
Member Author

⚠️ Issue Reference Review

An automated check found potentially unrelated issue/PR references in this PR:

Reference Assessment Reasoning
#11352 suspicious Issue #11352 is an RFC explicitly scoped to migrating math/base/special packages from relative-tolerance to ULP-based testing (its own instructions say to search for a package "in math/base/special"). This PR migrates tests for blas/base/dsymv, which is outside the issue's stated scope.

Why this matters: GitHub automatically closes issues referenced with
closing keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect
references can accidentally close unrelated issues.

What to do:

  • If the reference is correct, no action needed. This check may produce
    false positives.
  • If the reference is incorrect, please update your PR description.

This assessment was generated by an AI model and is informational only.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Needs Review A pull request which needs code review. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants