Fix inconsistent environment variable naming for setting NVTOOLEXT_HOME in TorchConfig.cmake (#48012)
Summary:
When building libtorch with CUDA installed in some unconventional
location, CMake files rely on some environment variables to set cmake
variable, in particular NVTOOLSEXT_PATH environment variable is used to
set NVTOOLEXT_HOME in cmake/public/cuda.cmake. Later when consuming
such build using the generated cmake finder TorchConfig.cmake, another
convention is used which feels rather inconsistent, relying on a
completly new environment variable NVTOOLEXT_HOME, although the former
way is still in place, cmake/public/cuda.cmake being transitively called
via Caffe2Config.cmake, which is called by TorchConfig.cmake
Fixes https://github.com/pytorch/pytorch/issues/48032
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48012
Reviewed By: gchanan
Differential Revision: D25031260
Pulled By: ezyang
fbshipit-source-id: 0d6ab8ba9f52dd10be418b1a92b0f53c889f3f2d