[DDP] Add a debug check in cpp fp16 compress (#63379)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63379
this codepath has been prone to bugs as seen in the below diff, this
will help ensure against changes/refactors that touch this, as a basic sanity
check. Enabled it in debug-only builds to not affect the perf.
ghstack-source-id: 136056093
Test Plan: CI
Reviewed By: SciPioneer
Differential Revision: D30358440
fbshipit-source-id: e1b3893a223722c2593ceed8696a09c7d07d47c1