chore: migrate internal tests/benches off deprecated row-major constructors - #54
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
Mat::from_row_majorfrom_col_majormat/*GpuMatrix::from_host_row_majorfrom_hostlib.rstests, bench)argmax_to_host_row_majorargmax_to_hostThe deprecated methods stay public as a perf hint for downstream consumers; a few
#[allow(deprecated)]tests keep them covered. Also dropped the bogussince = "0.4.0"from both deprecation attributes (crate is0.2.0, andsincedoesn'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 passmaturin develop+pytest→ 152 pass (CPU)🤖 Generated with Claude Code