Fix some NVCC warnings (#100823)
PR #95568 enables more NVCC warnings. However, some cu files need to be modified to make building process more warning free. Therefore, this work aims to fix them.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100823
Approved by: https://github.com/ngimel, https://github.com/Skylion007