LinearAlgebra.jl icon indicating copy to clipboard operation
LinearAlgebra.jl copied to clipboard

Some linalg tests have stochastic allocation behavior

Open gbaraldi opened this issue 2 years ago • 5 comments

Examples being addmul or bidiag. Where they allocate from a couple GB of memory to hundreds of gigabytes

gbaraldi avatar Nov 03 '23 17:11 gbaraldi

@gbaraldi Thank you for filing this issue. Could you please provide a short proof-of-concept code along with details on how you measure these?

aravindh-krishnamoorthy avatar Nov 13 '23 18:11 aravindh-krishnamoorthy

Basically running Base.runtests("LinearAlgebra/addmul", sometimes gives very different results. https://buildkite.com/julialang/julia-master/builds/29980#018bbd7f-25f8-4ef3-97ff-7b59d7d27476/771-1384 or https://buildkite.com/julialang/julia-master/builds/29980#018bbd7f-0b9e-4f5a-bbaa-17a68cbdf747/771-1290 for triangular. The number on the one before last column is how much memory was allocated

gbaraldi avatar Nov 13 '23 18:11 gbaraldi

@gbaraldi Isn't this because LinearAlgebra/test/addmul.jl has built-in test randomness? You feel this is a problem?

aravindh-krishnamoorthy avatar Nov 16 '23 19:11 aravindh-krishnamoorthy

@aravindh-krishnamoorthy, what in that randomness would cause the allocations to go "from a couple GB of memory to hundreds of gigabytes" in your opinion?

KristofferC avatar Nov 16 '23 19:11 KristofferC

Interesting... I'll try to take a closer look.

aravindh-krishnamoorthy avatar Nov 16 '23 20:11 aravindh-krishnamoorthy