Open ZzzTD opened 1 year ago
Release comments in dist_util.py
os.environ["CUDA_VISIBLE_DEVICES"] = f"{MPI.COMM_WORLD.Get_rank() % GPUS_PER_NODE}"
or change it like that:
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # your available gpu id
how to set on mutilple GPU, i set "os.environ["CUDA_VISIBLE_DEVICES"] = "1,2"" in dist_util.py, but still use single gpu
Release comments in dist_util.py
os.environ["CUDA_VISIBLE_DEVICES"] = f"{MPI.COMM_WORLD.Get_rank() % GPUS_PER_NODE}"
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
or change it like that:
os.environ["CUDA_VISIBLE_DEVICES"] = f"{MPI.COMM_WORLD.Get_rank() % GPUS_PER_NODE}"
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # your available gpu id