From 5e1044f5b62d7fb71365ea0f4a5d5f0c44a645e5 Mon Sep 17 00:00:00 2001 From: Martin Valgur <martin.valgur@gmail.com> Date: Fri, 23 Feb 2024 15:07:37 +0200 Subject: [PATCH] conanfile.py: improve cuda_architectures option --- conanfile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index a3f8d74f..5fa05568 100644 --- a/conanfile.py +++ b/conanfile.py @@ -40,7 +40,7 @@ class CupochConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "cuda_architectures": [None, "ANY"], + "cuda_architectures": ["native", "all", "all-major", "ANY"], "use_rmm": [True, False], } options.update({module: [True, False] for module in MODULES}) @@ -58,7 +58,6 @@ class CupochConan(ConanFile): "fPIC": "Enable position-independent code.", "cuda_architectures": ( "Sets the CUDA architectures to generate device code for via CMAKE_CUDA_ARCHITECTURES. " - "Generates code for all architectures if set to None." ), "use_rmm": "Use RAPIDS Memory Manager for memory management.", } @@ -187,8 +186,7 @@ def generate(self): tc.cache_variables["BUILD_EXAMPLES"] = False tc.cache_variables["BUILD_PYTHON_MODULE"] = False tc.cache_variables["USE_RMM"] = self.options.get_safe("use_rmm", False) - if self.options.cuda_architectures is not None: - tc.cache_variables["CMAKE_CUDA_ARCHITECTURES"] = self.options.cuda_architectures + tc.cache_variables["CMAKE_CUDA_ARCHITECTURES"] = self.options.cuda_architectures for module in MODULES: tc.cache_variables[f"BUILD_cupoch_{module}"] = module in self._enabled_modules tc.generate()