-
Notifications
You must be signed in to change notification settings - Fork 92
Improve differential operators #528
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
Conversation
|
Hi @ndem0, @dario-coscia, @FilippoOlivo, Tests for python 3.8 are failing in several different modules, not related to this PR. Since this version is no longer supported, I suggest to remove them. Preliminary results in terms of speedup:
Reported results are a qualitative average derived from the combination of these values:
|
dario-coscia
left a comment
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.
Thank you for the PR, really impressive the speedup. Since we are working on this I also suggested further improvements which could speed up even more! We need however to restructure a bit..
Idea:
-
Have
fastversions of operators where no checks are performed (nothing). These are exact copies of the ones we already have but with no checks. Why? Sometimes when calling recursively grad we do the same check (but we actually need to do the check only once at the beginning!). We can also think of doing a separate module calledfast_operator.pywhere we put these operators. Of course, we need to raise a warning when imported saying checks are not going to be performed and also write it in the doc. -
Rewrite our operators by calling the fast versions, avoiding multiple repeated checks
Co-authored-by: Dario Coscia <[email protected]>
|
Thanks to @dario-coscia for spotting a bug in |
dario-coscia
left a comment
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.
Just a minor change! The tests look good, and I think we are done besides that comment on advection
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
* Improve grad logic and fix issues * Add operators' fast versions * Fix bug in laplacian + new tests + restructuring Co-authored-by: Dario Coscia <[email protected]> * fix advection bug --------- Co-authored-by: Dario Coscia <[email protected]>
Fixes #525.
To do:
div;advection;divgradmethod forlaplacian;