From eaf9620f797ab6b928f6c719aebe966ac12fbe6b Mon Sep 17 00:00:00 2001 From: Daniel Bershatsky Date: Thu, 26 Dec 2024 04:18:17 +0300 Subject: [PATCH] [tsl] Add yet another candidate for CUDA root CUDA root is quite commonly located at `/opt/cuda`. Some linux distros like Archlinux installs CUDA to `/opt/cuda`. Additionally, some build systems like CMake uses this candidate for CUDA home as well. --- xla/tsl/platform/default/cuda_root_path.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/xla/tsl/platform/default/cuda_root_path.cc b/xla/tsl/platform/default/cuda_root_path.cc index 31e93c8b29e09..9c9afc238bc12 100644 --- a/xla/tsl/platform/default/cuda_root_path.cc +++ b/xla/tsl/platform/default/cuda_root_path.cc @@ -58,6 +58,7 @@ std::vector CandidateCudaRoots() { roots.push_back(TF_CUDA_TOOLKIT_PATH); roots.emplace_back(std::string("/usr/local/cuda")); + roots.emplace_back(std::string("/opt/cuda")); #if defined(PLATFORM_POSIX) && !defined(__APPLE__) Dl_info info;