-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUDA architecture is not being set properly #9
Comments
Hi @kyamant! Was this on the gl_cuda_simple_interop sample? Setting To set it from the command line:
And to set it from the GUI, click the Add Entry button, enter these settings, then click Configure and Generate:
Then you should see the SM version set in the sample's Property Pages > CUDA C/C++ > Command Line > Additional Options: And during the build, you should see the right --generate-code option in the build output: |
I do not want to go and set it individually for each project: I would like to be able set it for build all (when I ran cmake in build_all directory) |
Hi @kyamant -- I just tried setting |
Note that I set it in the CMake configuration settings and re-ran CMake; if I modified the |
How exactly did you set |
Hi @kyamant -- it turns out it's possible to set it even if it's not referenced in the CMake file! Ultimately, There's two ways to set it -- from the command line, and from the GUI -- I'll show both for completeness. From the command line, a typical build process specifying CMAKE_CUDA_ARCHITECTURES nlooks something like this:
From the GUI, start by specifying your source code and binary directories: I'm showing the process starting from an empty CMake cache here, but the cache doesn't need to be empty! If you've configured CMake before, you can add the variables following the steps below and everything should still work - no need to delete the cache. Click "➕ Add Entry" and set Also, set At this point, you'll see the two new variables you added at the top of CMake's variable list: Then press the Configure and Generate buttons, and then press Open Project to open Visual Studio. |
Used
CMAKE_CUDA_ARCHITECTURES
to set compute and sm to 86 but still they appear as 52 underCode Generation CUDA C/C++
of each Visual Studio project's property page. If I set it manually in Visual Studio a new vxproj file is created in addition to ALL_BUILD.vcxproj and INSTALL.vcxproj. Where does this project keep thecompute_52,sm_52
values for each project?The text was updated successfully, but these errors were encountered: