Explorar el Código

adding PT cuda allocation expand flag

Hamid Shojanazeri hace 1 año
padre
commit
a49a2c2804
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      utils/train_utils.py

+ 1 - 0
utils/train_utils.py

@@ -253,6 +253,7 @@ def setup_environ_flags(rank):
     os.environ["TORCH_SHOW_CPP_STACKTRACES"] = str(1)
     os.environ["NCCL_ASYNC_ERROR_HANDLING"] = str(1)
     os.environ["TORCH_DISTRIBUTED_DEBUG"] = "DETAIL"
+    os.environ['PYTORCH_CUDA_ALLOC_CONF']='expandable_segments:True'
     if rank == 0:
         print(f"--> Running with torch dist debug set to detail")