trivially convert memcpy sources to use const_data_ptr (#98754)
Differential Revision: [D44834491](https://our.internmc.facebook.com/intern/diff/D44834491/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98754
Approved by: https://github.com/Skylion007