Skip to content

Respect CMAKE_CUDA_ARCHITECTURES #2540

@SomeoneSerge

Description

@SomeoneSerge

Problem: Despite catboost using FindCUDAToolkit.cmake, it's still cumbersome to override the target CUDA architectures when building catboost. This is because the generated cmake files hard-code the gencodes in several places:

This also make it very hard to rebuild catboost with a different CUDAToolkit release (e.g. 1.2.2 would by default fail to build against CUDAToolkit 12, because e.g. compute_35 had been deprecated)

catboost version: 1.2.2

Proposed solution: instead of setting the gencodes using target_cuda_flags, consider relying on FindCUDAToolkit.cmake. If catboost uses an extra tool to orchestrate the cmake builds (including code generation), you could have that tool pass the -DCMAKE_CUDA_ARCHITECTURES flag to CMake, and these architectures would be automatically used for all of the targets in the project. This way users and package distributions can also easily override the targets locally

Thanks!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions