Hi @hariram_manohar
Both DDP and RPC can work on multiple machines. They operate on a group of processes (called ProcessGroup), and it is up to the application how to place those processes (on a single machine or multiple machines). You just need to call init_process_group or init_rpc with proper arguments. The choice between DDP or RPC depends on whether you want to divide input data or split model.
Take this 10 as an example. The code launches two processes on the same machine. But you can 1) set MASTER_ADDR to machine_1_ip and MASTER_PORT to e.g. 23456, and 2) run the example() function on two machines. The two processes will rendezvous using the ip and port you provided and DDP will then handle the communication for you.