From 138fe4b7264526f7aafd227f990ff0132ff76ba2 Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Wed, 5 Aug 2026 18:19:59 +0200 Subject: [PATCH] Remove unused CUDA options from setup.py --- python/vesin/setup.py | 14 ++------------ python/vesin_torch/setup.py | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/python/vesin/setup.py b/python/vesin/setup.py index 315da236..521ff41c 100644 --- a/python/vesin/setup.py +++ b/python/vesin/setup.py @@ -58,19 +58,9 @@ def run(self): "-DBUILD_SHARED_LIBS=ON", ] - CUDA_HOME = os.environ.get("CUDA_HOME") VESIN_ENABLE_NVTX = os.environ.get("VESIN_ENABLE_NVTX", "OFF") - - if CUDA_HOME is not None: - cmake_options.append(f"-DCUDA_TOOLKIT_ROOT_DIR={CUDA_HOME}") - cmake_options.append("-DVESIN_ENABLE_CUDA=ON") - if VESIN_ENABLE_NVTX.upper() in ["ON", "1", "TRUE", "YES"]: - cmake_options.append("-DVESIN_ENABLE_NVTX=ON") - - # fix for https://github.com/pytorch/pytorch/issues/113948, it does not - # matter which architecture we put here since we are not actually compiling - # any CUDA code, just linking against cudart - cmake_options.append("-DTORCH_CUDA_ARCH_LIST=9.0") + if VESIN_ENABLE_NVTX.upper() in ["ON", "1", "TRUE", "YES"]: + cmake_options.append("-DVESIN_ENABLE_NVTX=ON") subprocess.run( ["cmake", source_dir, *cmake_options], diff --git a/python/vesin_torch/setup.py b/python/vesin_torch/setup.py index de4a28ab..6058384d 100644 --- a/python/vesin_torch/setup.py +++ b/python/vesin_torch/setup.py @@ -70,19 +70,9 @@ def run(self): "-DBUILD_SHARED_LIBS=ON", ] - CUDA_HOME = os.environ.get("CUDA_HOME") VESIN_ENABLE_NVTX = os.environ.get("VESIN_ENABLE_NVTX", "OFF") - - if CUDA_HOME is not None: - cmake_options.append(f"-DCUDA_TOOLKIT_ROOT_DIR={CUDA_HOME}") - cmake_options.append("-DVESIN_ENABLE_CUDA=ON") - if VESIN_ENABLE_NVTX.upper() in ["ON", "1", "TRUE", "YES"]: - cmake_options.append("-DVESIN_ENABLE_NVTX=ON") - - # fix for https://github.com/pytorch/pytorch/issues/113948, it does not - # matter which architecture we put here since we are not actually compiling - # any CUDA code, just linking against cudart - cmake_options.append("-DTORCH_CUDA_ARCH_LIST=9.0") + if VESIN_ENABLE_NVTX.upper() in ["ON", "1", "TRUE", "YES"]: + cmake_options.append("-DVESIN_ENABLE_NVTX=ON") subprocess.run( ["cmake", source_dir, *cmake_options],