Skip to content

cleanup support for Float32 and ComplexF32 #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025
Merged

cleanup support for Float32 and ComplexF32 #597

merged 1 commit into from
Feb 17, 2025

Conversation

araujoms
Copy link
Contributor

@araujoms araujoms commented Feb 7, 2025

I fixed the same bug as #585, without realizing that it had already been done. It wasn't a complete waste of time, because the PR #586 left some cleanup to do: the lines

LinearAlgebra.qr(A::SparseMatrixCSC{<:Union{Float16,Float32}}; tol=_default_tol(A)) =
    qr(convert(SparseMatrixCSC{Float64}, A); tol=tol)
LinearAlgebra.qr(A::SparseMatrixCSC{<:Union{ComplexF16,ComplexF32}}; tol=_default_tol(A)) =
    qr(convert(SparseMatrixCSC{ComplexF64}, A); tol=tol)

would have prevented it from working if they actually worked! Luckily they don't, as the correct method is more specific and gets called, but it's still worth fixing. I also changed them to convert Float16 to Float32 instead of Float64, and the analogous change for complex numbers.

I also fixed the error messages one gets. They were of the form "dtype=$(s.dtype) not supported", which in my case translated to saying that Float64 wasn't supported when I tried calling it with Float32. s.dtype is the type that actually got computed, so it clearly is supported. I changed them to say "dtype=$(dtyp(Tv)) not supported".

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.08%. Comparing base (ff083ce) to head (ead6bd5).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/solvers/cholmod.jl 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #597      +/-   ##
==========================================
+ Coverage   84.06%   84.08%   +0.02%     
==========================================
  Files          12       12              
  Lines        9192     9192              
==========================================
+ Hits         7727     7729       +2     
+ Misses       1465     1463       -2     

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

@ViralBShah
Copy link
Member

LGTM. Let's give it a couple of days for comments.

@ViralBShah ViralBShah merged commit ce852af into JuliaSparse:main Feb 17, 2025
9 of 10 checks passed
@araujoms araujoms deleted the qrf32 branch February 18, 2025 08:50
@ViralBShah ViralBShah added the backport 1.12 Change should be backported to release-1.12 label May 10, 2025
@dkarrasch dkarrasch removed the backport 1.12 Change should be backported to release-1.12 label May 11, 2025
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.

3 participants