How does CUDA assign device IDs to GPUs?

后端 未结 4 653
我在风中等你
我在风中等你 2020-11-30 07:41

When a computer has multiple CUDA-capable GPUs, each GPU is assigned a device ID. By default, CUDA kernels execute on device ID 0. You can use

4条回答
  •  旧时难觅i
    2020-11-30 08:09

    Set the environment variable CUDA_DEVICE_ORDER as:

    export CUDA_DEVICE_ORDER=PCI_BUS_ID
    

    Then the GPU IDs will be ordered by pci bus IDs.

提交回复
热议问题