Workaround to pay attention for CUDA version (#46535)
Summary:
Added a workaround for the cases when NVCC tries to compile the object for sm_30 GPU compute capability to avoid the error message telling that `__ldg` intrinsic is not defined.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46535
Reviewed By: zou3519
Differential Revision: D24422445
Pulled By: ezyang
fbshipit-source-id: 66e8eb1cbe42d848cfff46d78720d72100e628f8