[dp/ddp mode]Enable checking which process I'm in
🚀 Feature

Motivation

The motivation is that in dp/ddp mode, one print statement in training_step ends up with multiple printed lines (4 lines because I'm using 4 GPUs)
Pitch

I hope that there's a self.rank to let the user check which process they're in.
So they may choose to print for only rank 0, or print the rank to screen with the msg to avoid confusion.
Alternatives

@williamFalcon suggests make it automatically handled with a self.print
Additional context

I'd prefer a self.rank because horovod has this ranking. I'm not sure if there are similar things in pytorch.