Open chldydgh4687 opened 4 years ago
1.터미널에서 python code를 실행하는 경우:
$ CUDA_VISIBLE_DEVICES=0 python script.py $ CUDA_VISIBLE_DEVICES=1 python script.py $ CUDA_VISIBLE_DEVICES=2,3 python script.py
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="0"
1.터미널에서 python code를 실행하는 경우:
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"