-
Notifications
You must be signed in to change notification settings - Fork 21
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
CalcFactor.cache in Parametric case #1480
Comments
This breaks a lot of things in parametric. I'll need some help understanding this. |
Okay, we can do a worksession. First week in April? |
@dehann , is preamble cache second parameter supposed to be |
Hi Johan, sorry I don't quite follow your question? I think you mean what is the signature for So default for a factor is If one goes and overrides Here are the docs for I tried to capture most of the headline stuff in docs, perhaps that helps if above does not answer yet? Happy to answer more? |
The second parameter here: |
From doc used as symbols: |
Not following on inconsistency. yes addFactor uses Vector of Symbol. |
Sorry copied wrong line, see RoME in places: https://github.com/JuliaRobotics/RoME.jl/blob/1f9795a06994169e946506686171894aabccf714/src/factors/Bearing2D.jl#L18 I'm guessing it's just a bug then? |
The doc I wanted to reference is the news: IncrementalInference.jl/NEWS.md Line 33 in 16e2a90
|
oh sorry, let's fix that |
is that better? |
Oh, that is a bug yes. Should be |
My sense is to get performance, we need to get allocations down to 0. The only way to do that is with in-place operations everywhere. The only way we can do in-place is to preallocate memory somewhere, and the only way I see to do that is with |
Currently, we cannot get allocations down to 0, this example uses SArrays for p,q and MArray for X_hat
|
Also, remember |
|
Right, so first cut is then to get everything on the stack and avoid allocations on the heap?
Okay, I'm not knowledgeable enough to easily answer that, but sounds like it can be faster.
oops, there is another way i forgot about. The factor struct itself can hold memory or fields, but user needs to be careful on how to use multithreading. Part of Another thing, I was thinking we should get |
Matheusz is updating some manifolds to work faster with SArray, so I think it should be on the stack then. Parametric is not a big lift and I tried it as an experiment already. I think we should consider upgrading IIF to be able to work with SArrays before we do #1010? |
That's a good idea, we should be able to do that relatively quickly.
Ah that's great, sounds good |
Users can now overload:
which runs once at factor creation. Cache is stored at
ccw.dummyCache::C
andCalcFactor.cache::C
.Parametric code needs to be refactored to allow
preampleCache(dfg, vars, usrfnc)
function to run here:IncrementalInference.jl/src/ParametricUtils.jl
Lines 116 to 118 in fe40bd8
The text was updated successfully, but these errors were encountered: