linux gpu Id specified

reference: How linux server to specify the amount and gpu

Method 1: In the command line

CUDA_VISIBLE_DEVICES=0

 

Method 2: python file

OS Import
os.environ [ "CUDA_VISIBLE_DEVICES"] = "0" specifies the first one gpu #

Guess you like

Origin blog.csdn.net/u_7890/article/details/88770383