Closed liuxz-cs closed 4 years ago
你好,我在运行过程中按照ReadMe中的命令运行时,程序会默认检测当前空闲gpu并且全部占满gpu,我想请问一下如果我想只在某一块gpu或者某几块gpu上运行的话,有什么办法吗
通过设置Python环境中可见的GPU数量即可 tensorflow下设置使用某一块GPU(从0开始编号):
import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "1"
你好,我在运行过程中按照ReadMe中的命令运行时,程序会默认检测当前空闲gpu并且全部占满gpu,我想请问一下如果我想只在某一块gpu或者某几块gpu上运行的话,有什么办法吗