Use src size for memcpy in order to avoid fortify complaints (#65222)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65222
When compiling against the Android SDK with `--D_FORTIFY_SOURCE=2`, the compiler will complain that the `dst` size is a larger size than the `src` size due to the function templating using two differently sized objects. There is a `TORCH_CHECK` to ensure we don't go through with these `memcpy`'s, but in the interest of making the compiler happy, lets switch the `memcpy` to take `sizeof(src)`.
Test Plan: CI
Reviewed By: bertmaher, lanza
Differential Revision: D30992678
fbshipit-source-id: b3e7aa992a3650e1051abad05be800b684e6332b