Skip to content
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

Which Visual Studio 2022 BuildTools MSVC is the best version for Cuda 11.8 and Cuda 12.4 and so #2383

Open
FurkanGozukara opened this issue Sep 6, 2024 · 1 comment
Labels
bug Something isn't working right.

Comments

@FurkanGozukara
Copy link

FurkanGozukara commented Sep 6, 2024

I keep having issues when compiling apps that requires CUDA and C++ tools on windows

I would like to learn best version for CUDA 11.8 and CUDA 12.4

There are so many versions listed here and not all of them working

https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history

For example recently I am compiling XPose and it is so sensitive to the C++ versions

Which version from above list do you suggest?

The list starts from 17.0 to 17.10

Can we say that LTSC 17.10 is better than LTSC 17.4

I really need help with this

@FurkanGozukara FurkanGozukara added the bug Something isn't working right. label Sep 6, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Sep 6, 2024
@wmaxey
Copy link
Member

wmaxey commented Sep 6, 2024

Hi @FurkanGozukara, we may not be able to help with XPose, but I can help with understanding Windows compiler versions.

Version 17.11 or 17.10 should be the latest compiler builds from MSVC, however they might be too new or unsupported by CUDA 11.8. I'll try to setup an example for how to find and install the latest version of the MSVC Build Tools supported by the oldest version of CUDA you are using.

Since you mentioned 11.8, we'll use that to find out what is the maximum version CUDA can interop with.
https://docs.nvidia.com/cuda/archive/11.8.0/cuda-installation-guide-microsoft-windows/index.html#system-requirements

Luckily it looks like 193X is supported, which maps to 17.X/VS 2022. Later in the docs they mention 17.0, I do not know if that means 11.8 will work with the latest MSVC build tools version mentioned above. We can try both with the same install.

You can download the build tools installer from aka.ms here:
https://aka.ms/vs/17/release/vs_buildtools.exe

If you then run the installer you might be greeted with a page asking you to repair or modify installations if it detects you have run the installer before. Modify is fine, it will let you make the same changes I will suggest you go with anyways.

Image

Here I've selected 3 versions of MSVC. The latest available, 17.11, and 17.0, 17.0 matches what is in the docs, but there is no harm in trying to build with the latest version of compiler anyways. You will also likely want to install a Windows SDK unless that is already installed. CMake as well if you need it.

Once these are installed you can begin building in the VS 2022 CMD developer prompt. By default the developer prompt will pick the latest compiler. So once it's opened you can give building a shot. If that doesn't work, you can reopen the prompt and downgrade the version you are using.

C:\path\to\installed\msvc\VC\Auxiliary\Build\vcvars64.bat -vcvars_ver="14.30"

You can pick a new vcvars set with this to try building with a different version. "14.30" should be MSVC 17.0. The mapping of MSVC compiler version to VS release version breaks down from there. 17.11 corresponds with a later version of "14.39" most likely. You can actually just examine the folder container vcvars64.bat to find what versions are installed and use those accordingly.

Without knowing more about your build failures we can't help diagnose which is giving you more trouble. Whether that be project or actual interop between MSVC and CUDA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Status: Todo
Development

No branches or pull requests

2 participants