Add CUDA kernel checks to fbcode/caffe2/caffe2/sgd (#48347)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48347
Add a safety check `TORCH_CUDA_KERNEL_LAUNCH_CHECK()` after each kernel launch. This only includes changes to `//caffe2/caffe2/sgd`. Specifically these files did not have any kernel launch checks before.
Files changed were determined by running `python3 caffe2/torch/testing/check_kernel_launches.py`.
Other directories will be done in seperate diffs.
Test Plan:
Check build status
```
buck build //caffe2/caffe2:caffe2_cu
```
- https://www.internalfb.com/intern/buck/build/5cb3185e-b481-4f83-9c3a-260827dde5ef
Running
```
python3 caffe2/torch/testing/check_kernel_launches.py
```
results in no files within this subdirectory (as of now)
- P150434759
Reviewed By: jianyuh
Differential Revision: D24868557
fbshipit-source-id: 1ad02260bcc9d13710bfd577c8d93be52595845c