Skip to content

chore: migrate internal tests/benches off deprecated row-major constructors - #54

Merged
isPANN merged 2 commits into
mainfrom
chore/tests-col-major
May 30, 2026
Merged

chore: migrate internal tests/benches off deprecated row-major constructors#54
isPANN merged 2 commits into
mainfrom
chore/tests-col-major

Conversation

@isPANN

@isPANN isPANN commented May 30, 2026

Copy link
Copy Markdown
Collaborator

What

Internal tests, doc examples, and the CUDA AD benchmark were calling the deprecated row-major convenience constructors, so the crate emitted 55+ deprecation warnings against its own API. Migrate every internal caller to the native column-major path — data hand-transposed so the logical matrices are unchanged (every assertion still holds):

deprecated (kept public) → migrated to where
Mat::from_row_major from_col_major CPU mat/*
GpuMatrix::from_host_row_major from_host CUDA input (lib.rs tests, bench)
argmax_to_host_row_major argmax_to_host CUDA argmax output (bench)

The deprecated methods stay public as a perf hint for downstream consumers; a few #[allow(deprecated)] tests keep them covered. Also dropped the bogus since = "0.4.0" from both deprecation attributes (crate is 0.2.0, and since doesn't gate the warning anyway — it fires on every use immediately).

Result

0 deprecation warnings (was 55+), 0 total workspace warnings.

Verification

  • cargo test -p tropical-gemm → 275 unit + 24 doctests pass
  • maturin develop + pytest → 152 pass (CPU)
  • CUDA 56/56 on HKUST-GZ A40 (Slurm job 9800403)

🤖 Generated with Claude Code

…uctors

Internal tests, doc examples, and the CUDA AD benchmark used the deprecated row-major convenience constructors, so the crate emitted 55+ deprecation warnings against its own API. Migrate every internal caller to the native column-major path (data hand-transposed so logical matrices are unchanged):

  - Mat::from_row_major            -> from_col_major   (CPU)
  - GpuMatrix::from_host_row_major -> from_host        (CUDA input)
  - argmax_to_host_row_major       -> argmax_to_host   (CUDA output)

The deprecated methods stay PUBLIC (a perf hint for downstream); a few #[allow(deprecated)] tests keep them covered. Also dropped the bogus `since = "0.4.0"` from both deprecation attributes (crate is 0.2.0; `since` does not gate the warning anyway). Result: 0 deprecation warnings (was 55+), 0 total workspace warnings.

Verified: cargo test -p tropical-gemm (275 + 24 doctests), maturin + pytest (152 CPU), CUDA 56/56 on HKUST-GZ A40 (job 9800403).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.29%. Comparing base (cfa56d4) to head (c053d45).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #54   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files          19       19           
  Lines         918      918           
=======================================
  Hits          884      884           
  Misses         34       34           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@isPANN
isPANN merged commit 20e0aca into main May 30, 2026
9 checks passed
@isPANN
isPANN deleted the chore/tests-col-major branch May 30, 2026 06:18
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