Add DDP check while wrapping model for flop_count_operators
Add DDP check while wrapping model for flop_count_operators

Summary: torch.jit does not work with models wrapped with nn.parallel.distributed.DistributedDataParallel / nn.DataParallel (whenever we run multi-gpu d2 jobs). fvcore.nn.flop_count already has a check for this, but since we need to wrap d2 models, we need to add the same check here as well.

Reviewed By: rbgirshick, bxiong1202

Differential Revision: D19990334

fbshipit-source-id: d002fc5db1e9ef5c492e82d17b2dc2a453c736af

facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2