Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Mar 29, 2024
1 parent ebcdc96 commit ce2dff6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def main(cfg: DictConfig) -> Trainer:
if expandeable_segments:
cuda_alloc_conf.append('expandeable_segments:True')

os.environ['PYTORCH_CUDA_ALLOC_CONF'] = ','.join(cuda_alloc_conf)
if len(cuda_alloc_conf) > 0:
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = ','.join(cuda_alloc_conf)

# Set CUDA lazy loading
# This can save a bit of memory if not all modules are needed
Expand Down

0 comments on commit ce2dff6

Please sign in to comment.