-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce redundant GPU allocations (#2393)
# Introduction - Do not allocate and fill storage for resetting ion concentrations if these are never changed. Reasoning: If concentrations are never changed, we do not reset them and thus do not need to store the values. - Remove a duplicate of the CV area in solver and shared state and pass a reference during solving - Remove redundant `solution` from GPU solver - Do not store / allocate diffusion values if not needed. This saves **per CV** - `1 x 8B` for `cv_area` unconditionally - `1 x 8B` for `Xd` for each ion with no diffusion is in use (majority of cases) - `2 x 8B` for `Xi` for each ion (`reset` and `init`) if not written (reasonably often) - `2 x 8B` for `Xo` for each ion (`reset` and `init`) if not written (majority of cases) - `1 x 8B` for `eX` reset for each ion if not read (majority) - `1 x 8B` for `eX` for each ion if not read (rarely) In my standard benchmark, `busyring` with complex cells, this saves about 18% of the total GPU allocation for the cell data (`shared_state`). This has become a mixed bag, fixing a few additional things that came up during testing this: - a bug in event handling on GPU - pybind11 stub generation --------- Co-authored-by: Jannik Luboeinski <[email protected]> Co-authored-by: boeschf <[email protected]>
- Loading branch information
1 parent
fd2718c
commit b8b768d
Showing
17 changed files
with
184 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.