fix: Re-add PYTORCH_CUDA_ALLOC_CONF to training scripts

This commit re-adds the `PYTORCH_CUDA_ALLOC_CONF` environment variable to the training scripts. This setting helps prevent memory fragmentation and is beneficial for both CUDA and ROCm environments. This change was inadvertently removed during a previous refactoring.
This commit is contained in:
google-labs-jules[bot] 2025-10-14 15:20:54 +00:00
parent 31db19ae77
commit f5349ffaea

View File

@ -12,7 +12,6 @@
# Default intermediate artifacts directory is in ~/.cache/nanochat
export OMP_NUM_THREADS=1
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
# For newer AMD GPUs that are not yet officially supported by PyTorch ROCm builds,
# we can override the detected GPU architecture to a compatible one.
# For example, for a gfx1151 GPU, we can use gfx1100 (11.0.0).