Hey @xwjBupt

you will need to launch two DDP processes, operating on cuda:6 and cuda:7 respectively.

CUDA_VISIBLE_DEVICES need to be set before launching the main process.

Sth like:
CUDA_VISIBLE_DEVICES=6,7 python main.py

And then, in main.py, you can launch two DDP sub-processes and set device_ids to [0] and [1] respectively. See this example: https://pytorch.org/docs/stable/notes/ddp.html 70