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

reduce allocations during iteration to essentially zero #36

Merged
merged 3 commits into from
Aug 23, 2018
Merged

Conversation

chriscoey
Copy link
Collaborator

@chriscoey chriscoey commented Aug 22, 2018

I have LP allocations down to nil. working on SOS allocations (and can probably improve efficiency of the SOS barrier procedures with a little thought - see #37).

I also refactored linear system solve into its own function. partially fixes #31

fixes #12

prm.gtmp .-= diag(prm.VtVp)
prm.Htmp .+= prm.VtVp.^2

prm.Vp[j] .= prm.ipwt[j]/F.U # TODO in-place syntax should work but ldiv! is very broken for triangular matrices in 0.7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Julia 0.7 missing methods

prm.Htmp .+= prm.VtVp.^2

prm.Vp[j] .= prm.ipwt[j]/F.U # TODO in-place syntax should work but ldiv! is very broken for triangular matrices in 0.7
mul!(prm.Vp2, prm.Vp[j], prm.Vp[j]') # TODO if parallel, need to use separate Vp2[j] # TODO this is much slower than it should be on 0.7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Julia 0.7 very slow

calcHiprod_prm!(prod, arr, prm::SumOfSquaresCone) = (prod .= prm.F.U\(prm.F.L\arr)) # TODO do in-place
calcLiprod_prm!(prod, arr, prm::SumOfSquaresCone) = (prod .= prm.F.L\arr)
calcHiprod_prm!(prod, arr, prm::SumOfSquaresCone) = ldiv!(prod, prm.F, arr)
calcLiprod_prm!(prod, arr, prm::SumOfSquaresCone) = ldiv!(prm.F.U', arr, prod) # TODO this in-place syntax should not work (arguments order wrong, should accept F.L) but ldiv! is very broken for triangular matrices in 0.7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Julia 0.7 missing methods / incorrect definition

@chriscoey
Copy link
Collaborator Author

SOS allocations are reduced but not yet at zero, because there are missing methods for ldiv! on triangular matrices. see comments.

Unclear when the Julia issues will be fixed (I haven't submitted them yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant