CUDA_VISIBLE_DEVICES=1 Only device 1 will be seen
CUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visible
CUDA_VISIBLE_DEVICES=“0,1” Same as above, quotation marks are optional
CUDA_VISIBLE_DEVIC
一、在终端执行程序时指定GPU$ CUDA_VISIBLE_DEVICES=1 python run_file.py可用以下形式:CUDA_VISIBLE_DEVICES=1 Only device 1 will be seenCUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visibleCUDA_VISIBLE_DEVICES=“0,1” Same as above, quotation marks are optionalCUDA_V