Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add profile decorator to simpa utils
- Allows `@profile` decorator to be added to functions - By default this decorator does nothing - But if the SIMPA_PROFILE` environment variable is set to: - `TIME`: `line_profiler` is used for line-by-line run-time profiling - `MEMORY`: `memory_profiler` is used for line-by-line RAM use profiling - `GPU_MEMORY`: `pytorch_memlab` is used for line-by-line GPU RAM profiling - Profiling output is written to the console when the script finishes - For GPU_MEMORY, a summary of gpu memory use (torch.cuda.memory_summary()) is also written to the console - Add these profiling dependencies to tool.poetry.group.profile.dependencies
- Loading branch information