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

Memory build-up on various locations #806

Open
hasan7n opened this issue Feb 26, 2024 · 4 comments
Open

Memory build-up on various locations #806

hasan7n opened this issue Feb 26, 2024 · 4 comments

Comments

@hasan7n
Copy link
Contributor

hasan7n commented Feb 26, 2024

When using the FeTS tool (script), we noticed two sources of memory build-up:

  1. Memory build-up due to figure_generator (lines), around 200MB per call.
  2. Memory build-up due to GaNDLF's main_run function (lines), around 400MB per call.

Further profiling of GaNDLF'S main_run showed the information below (note: the profiling was done on GaNDLF's commit 616b37bafad8f89d5c816a88f44fa30470601311)

  • Around 100MB build-up caused by this line. Note that clearing the model variable at the end of the inference loop will resolve this.
  • Around 280MB build-up caused by this line. Note that clearing the compiled_model variable will not resolve this, which suggests that the build-up happens inside the compiled ov library.
  • Other multiple lines of code in different places cause few MBs build-ups
@sarthakpati sarthakpati changed the title Memory build-up Memory build-up on various locations Feb 26, 2024
@sarthakpati
Copy link
Collaborator

Thanks for the detailed report!

I am guessing the main_run buildup could be related to #780, but this needs to be investigated.

@hasan7n
Copy link
Contributor Author

hasan7n commented Feb 27, 2024

FWIW, this is the memory profiler used:
https://pypi.org/project/memory-profiler/

@sarthakpati
Copy link
Collaborator

FYI, 1 is not in GaNDLF, and is a different library (https://github.com/CBICA/FigureGenerator). Though the underlying dependencies are very similar (SimpleITK and numpy).

Copy link
Contributor

Stale issue message

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

No branches or pull requests

2 participants