Merge pull request #1 from LokiMetaSmith/fix/pytorch-memory-fragmentation

Set PYTORCH_CUDA_ALLOC_CONF to prevent memory fragmentation
This commit is contained in:
Lawrence R Kincheloe III 2025-10-14 02:11:58 -05:00 committed by GitHub
commit 31db19ae77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@
# 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).