mirror of
https://github.com/karpathy/nanochat.git
synced 2026-04-02 13:45:21 +00:00
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:
parent
31db19ae77
commit
f5349ffaea
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user