Skip to content

Commit

Permalink
Disable GPU memory pre-allocation by default during training.
Browse files Browse the repository at this point in the history
- This affects some systems with low memory GPUs.
  • Loading branch information
talmo committed Aug 18, 2020
1 parent 5e1efa2 commit 0aef828
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions sleap/nn/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,13 @@ def main():
logger.info(job_config.to_json())
logger.info("")

logger.info("System:")
if sleap.nn.system.is_gpu_system():
# Disable preallocation to handle Linux/low GPU memory issue.
sleap.nn.system.disable_preallocation()
sleap.nn.system.summary()
logger.info("")

logger.info("Initializing trainer...")
# Create a trainer and run!
trainer = Trainer.from_config(
Expand Down
2 changes: 1 addition & 1 deletion sleap/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
Must be a semver string, "aN" should be appended for alpha releases.
"""
__version__ = "1.0.9a2"
__version__ = "1.0.9a3"

0 comments on commit 0aef828

Please sign in to comment.