Skip to content

Commit

Permalink
conanfile.py: improve cuda_architectures option
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Feb 23, 2024
1 parent 1cb62ee commit 5e1044f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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.",
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5e1044f

Please sign in to comment.