Skip to content

Conversation

@brownbaerchen
Copy link
Collaborator

Due Diligence

  • General:
  • Implementation:
    • unit tests: all split configurations tested
    • unit tests: multiple dtypes tested
    • NEW unit tests: MPS tested (1 MPI process, 1 GPU)
    • benchmarks: created for new functionality
    • benchmarks: performance improved or maintained
    • documentation updated where needed

Description

As detailed in #2054, the APIs of heat and numpy differ for svd in that heat returns $V$ and numpy returns $V^T$ in the decomposition $A = U S V^T$. This PR changes the heat API for svd and related functions to match the numpy API.

Issue/s resolved: #2054

Changes proposed:

  • Breaking API change: svd and related functions return $V^T$ instead of $V$ as before
  • Small refactor of heat.core.linalg.svd
  • Add test that the heat and numpy svd APIs match
  • Fix a few small typos in documentation

Type of change

  • Bug fix
  • Breaking change

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Thank you for the PR!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Thank you for the PR!

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Thank you for the PR!

@JuanPedroGHM
Copy link
Member

JuanPedroGHM commented Jan 7, 2026

Benchmarks results - Sponsored by perun

FTPx86-AMD-Milan-Mi250 - CPU - N4 - RUNTIME

Function Value [s] Change % 30 day avg. [s] Last entrie [s]
randomized_svd_split1 0.0265715 13.5628 0.023398 0.0188619
randomized_eigh_split1 0.0163582 -12.9075 0.0187826 0.0214194
concatenate 0.245544 15.8791 0.211896 0.205057
apply_inplace_min_max_scaler_and_inverse 0.00617962 43.2365 0.00431428 0.00476065
apply_inplace_max_abs_scaler_and_inverse 0.000629711 -56.5208 0.00144831 0.000590229

FTPx86-AMD-Milan-Mi250 - GPU - N4 - RUNTIME

Function Value [s] Change % 30 day avg. [s] Last entrie [s]
matmul_split_0 0.132893 19.3944 0.111306 0.111222
randomized_eigh_split0 0.0624381 -11.3498 0.070432 0.0617291
apply_inplace_min_max_scaler_and_inverse 0.00765181 56.0069 0.00490479 0.00240822
apply_inplace_max_abs_scaler_and_inverse 0.00189343 -21.779 0.00242061 0.00257225
apply_inplace_normalizer 0.0130144 28.5156 0.0101267 0.0143566
convolution_array_distributed 0.013139 -24.0842 0.0173073 0.0171062
convolution_array_distributed_stride 0.0238228 -28.1879 0.0331738 0.0346745
convolution_batch_processing 0.0103748 96.1258 0.00528989 0.00284004

Grafana Dashboard
Last updated: 2026-01-07T11:54:29Z

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 98.50746% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.68%. Comparing base (a2994ab) to head (9e2e29f).

Files with missing lines Patch % Lines
heat/core/linalg/svdtools.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2089      +/-   ##
==========================================
- Coverage   91.69%   91.68%   -0.01%     
==========================================
  Files          89       89              
  Lines       13943    13946       +3     
==========================================
+ Hits        12785    12787       +2     
- Misses       1158     1159       +1     
Flag Coverage Δ
unit 91.68% <98.50%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

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

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[Bug]: SVD API inconsistencies

3 participants