Check inputs have same dtype in addmm_impl_cpu_ even if input has zero numel (#100274)
Fixes #99226
When an inputs has zero numel, addmm_impl_cpu_'s check that the inputs have the same dtype are bypassed. This PR adds a check before the early return.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100274
Approved by: https://github.com/ngimel