SciML / LinearSolve.jl

LinearSolve.jl: High-Performance Unified Interface for Linear Solvers in Julia. Easily switch between factorization and Krylov methods, add preconditioners, and all in one interface.
https://docs.sciml.ai/LinearSolve/stable/
Other
244 stars 52 forks source link

Is there a reason to use CpuId? #536

Closed halentin closed 2 weeks ago

halentin commented 2 weeks ago

I ran into issues with LinearSolve failing to precompile on our 32-Bit-Tests. It appears the issue stemmed from an upstream bug https://github.com/m-j-w/CpuId.jl/issues/62#issue-2489752035. I submitted a PR that should fix it upstream, but is there even any good reason to use CpuId at all in this case? It appears CpuId is only used to check for "EPYC" in the CPU-Name: https://github.com/SciML/LinearSolve.jl/blob/1c30db0320fbc9d81dda55b291809b7624150c12/src/LinearSolve.jl#L49 On both machines i tested it on (one having an EPYC-CPU), Julias builtin Sys.cpu_info()[1].model returns the same String (minus some spaces) as CpuId.cpubrand(). So maybe this dependency could be completely removed and replaced by the builtin function?

ChrisRackauckas commented 2 weeks ago

This was just because that's how @chriselrod showed me how we could do it. If you have a way to do it without CpuId please make a PR.

chriselrod commented 2 weeks ago

This was just because that's how @chriselrod showed me how we could do it. If you have a way to do it without CpuId please make a PR.

I also showed an example using cpubrand.