-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve InterpolateAndExtrapolate performance for array valued maps #1347
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…into itp_map_speedup
Ready for review! |
Hi @l-althueser , thanks for this PR! However for multiple dimension values, there is a problem of the dimension of
In this example I got an error:
Also I'm not sure what does |
Hey @yuema137 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @l-althueser . I tested the PR with a run, and it seems to not change any result.
This is a first try to improve the performance of InterpolateAndExtrapolate. The current main issue is that we do a lot of unnecessary array operations to be more flexible. However, for special use cases we can improve by at least a factor 2 in small tests if we do not store the intermediate results and use Einstein summation convention.
This makes the code more complex but we can save a lot of time for any pattern map operation. I kept the behavior identical to previous implementation for all cases except the array valued maps used for S1 and S2 patterns.
I tested locally with several use cases.