Skip log line if no tensors were dedupped (#119742)
Skips log line if nothing was dedupped. Avoids unhelpful logs like:
```
2024-02-13 01:31:52,113 _dedup_tensors.py:46 INFO p:MainProcess t:MainThread: Duplicate keys to remove: {}
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119742
Approved by: https://github.com/Skylion007