face-alignment icon indicating copy to clipboard operation
face-alignment copied to clipboard

Can not change device to 'cuda:1' for faceAlignment

Open ZhenyanSun opened this issue 2 years ago • 2 comments

for I have cuda 0,1,2,3 but it specifies to 0 always.

ZhenyanSun avatar Jun 06 '22 09:06 ZhenyanSun

You should be able to change this by passing the device explicitly: e.g.: device = 'cuda:1' when constructing the model. Alternatively, if you are running this as a separate script you can export the CUDA_VISIBLE_DEVICES=3 (for the 4th gpu) before calling you script.

1adrianb avatar Jun 07 '22 10:06 1adrianb

You should be able to change this by passing the device explicitly: e.g.: device = 'cuda:1' when constructing the model. Alternatively, if you are running this as a separate script you can export the CUDA_VISIBLE_DEVICES=3 (for the 4th gpu) before calling you script.

Thanks very much for your reply. Before I specify the os.environ["CUDA_VISIBLE_DEVICES"]="3" and also specify the device = 'cuda:3', then there was cuda error.

ZhenyanSun avatar Jun 08 '22 07:06 ZhenyanSun