Does DDP work on 2 cards with different number of GPUs?

Would it be possible to do DDP multi-nodes multi-gpus training if e.g., 1st card got 4 gpus, 2nd card got 4 gpus, and the 3rd got 2 gpus?

yes, it should work if you run one process on each GPU