Decouple Distributed from LinearAlgebra#29975
Conversation
| function disable_threaded_libs() | ||
| LinearAlgebra.BLAS.set_num_threads(1) | ||
| LA = Base.PkgId(Base.UUID((0x37e2e46d_f89d_539d,0xb4ee_838fcccc9c8e)), "LinearAlgebra") | ||
| if haskey(Base.loaded_modules, LA) |
There was a problem hiding this comment.
This seems to make disabling blas threads depend on when you load LinearAlgebra. We should have a more comprehensive solution.
There was a problem hiding this comment.
This seems to make disabling blas threads depend on when you load LinearAlgebra.
I thought this was the intention. So this function is more: "don't let any threaded libraries use more than one thread" rather than, as I interpreted it: "disable all loaded libraries that use more than one thread"? (Also to have disable in the name is a bit weird.)
We should have a more comprehensive solution.
I feel like a hook in Base might be better then? Such that other libraries also can be disabled with this function?
There was a problem hiding this comment.
I thought this was the intention.
I don't see how that could be a good thing. using LinearAlgebra followed by adding processors => threads disabled. Adding processors followed by using LinearAlgebra => threads enabled. Gotcha. A hook in Base would be better.
|
Replaced by #30004. |
Decouples
DistributedfromLinearAlgebra; this makes it possible to haveDistributedin the sysimg without the constraint to also haveLinearAlgebrain there.