Replies: 1 comment
-
This looks like a case for a custom cmake toolchain + triplet |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
When you work on cuda code you have two different necessities for the cuda architecture, in debug build you only care to build for the video card you have and the faster the build the better, in release you want to support more architectures if you later want to release your application/library. In this moment there's no way to specify what architecture you want, and if you hack it in some way there's no way to have different architectures for debug and release
Proposed solution
Create and use two env var VCPKG_CUDA_ARCHITECTURES_DEBUG/VCPKG_CUDA_ARCHITECTURES_RELEASE that the developer can set on his machine and the ports can then opt-in to use them to initialize the relative internal variable used by the scripts.
For cmake > 3.18 they can be used to set CMAKE_CUDA_ARCHITECTURES property during configuration.
For library that do not use cmake > 3.18 cuda toolkit system they can be used to init the build in the correct way manually in the port file
In this way I could set
VCPKG_CUDA_ARCHITECTURES_DEBUG = "60" my video card target
VCPKG_CUDA_ARCHITECTURES_RELEASE = "50 60 70 80" All the arch I want to support on release
And for example installing opencv4[cuda] will use the correct architectures for my needs.
Beta Was this translation helpful? Give feedback.
All reactions