Environment Variable Syntax | Results |
---|---|
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_DEVICES=0, 2, 3 | Devices 0, 2, 3 will be visible; device 1 is masked |
自主选择GPU——CUDA_VISIBLE_DEVICES 环境变量说明
最新推荐文章于 2024-08-03 10:23:28 发布