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

Multiply source weights into S/B matrix in one shot #396

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

jvansanten
Copy link
Contributor

@jvansanten jvansanten commented Sep 4, 2024

Multiplying a CSR matrix row-wise and then summing over rows is ~40x faster than masked assignments to a LIL matrix followed by a row-wise sum for 100 sources. For 1000 sources, the speedup is ~200x; for 10000, ~1900x (800 ms per gamma point vs 27 minutes). Who knew?

Multiplying a CSR matrix row-wise and then summing over rows is ~40x faster than masked assignments to a LIL matrix followed by a row-wise sum. Who knew?
@JannisNe
Copy link
Collaborator

JannisNe commented Sep 6, 2024

That's cool. Could that also be used in the StandardMatrixLLH?

@JannisNe JannisNe requested a review from sathanas31 September 6, 2024 07:07
@sathanas31
Copy link
Contributor

Quick answer is yes. For StandardMatrixLLH there is no gamma dependence of the signal spatial, so it corresponds to the first if statement in the StdMatrixKDEEnabledLLH where the SoB and weighting are decoupled

@jvansanten jvansanten merged commit 899479e into icecube:master Sep 9, 2024
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants