Skip to content
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

cleanup support for Float32 and ComplexF32 #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

araujoms
Copy link

@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).

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.

@ViralBShah
Copy link
Member

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

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.

2 participants