Open dokluch opened 2 years ago
you just need to copy all the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\visual_studio_integration\MSBuildExtensions, and paste them to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations. These paths should be changed to your own.
you just need to copy all the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\visual_studio_integration\MSBuildExtensions, and paste them to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations. These paths should be changed to your own.
Man you saved a week trying to fix this issue!!! Finally solved it !!
what the reason behind this ?
you just need to copy all the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\visual_studio_integration\MSBuildExtensions, and paste them to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations. These paths should be changed to your own.
Edit: If you do not have the VS IDE installed but are only using the build tools, say in conjunction with VS Code, the solution is about the same. The same directory exists inside of Visual Studio Build Tools:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations
I placed those 4 files there and it solved my problem. Thank you.
Very similar paths for MS VS 2022:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations
Thanks for the info, I have MS VS 2017 build tools but the path C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC does not exists Could some one help here where i can copy the 4 files to which location ?
The paths are described here: https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#sample-projects
Have you tried looking under:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations
The part between 2017 and Common7 might be different based on how much money you get to spend on MS VC 2017.
Thanks @HenkPoley for the document link. There is a tweak here, we don't have IDE we have only build tools. Also i am able to find all 4 files in the location C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations but looks like its depreciated. Question is does the IDE is mandatory for cmake to find cuda. Source code used of CMakeLists.txt if (WIN32) message("Windows machine found CMAKE_CUDA_COMPILER will be set") set (CMAKE_CUDA_COMPILER "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/bin/nvcc.exe") endif() include(CheckLanguage) check_language(CUDA)
if (CMAKE_CUDA_COMPILER) message("Cuda verified ****") enable_language(CUDA) set(CUDA_MODE ON) message("Enabled Cuda") else() message(STATUS "No CUDA compiler found; disabling CUDA model") endif()
The cmake configuration fails with same error - No CUDA toolset found in enable_language(CUDA). I have already invested one day, but nothing helped. if you can help here will be really helpful.
Machine details - OS Windows 19 Server Cuda v11.8 Visual Studio build tools (IDE not allowed to be installed)
Omg your hints saved my day if we copy that 4 files here C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\BuildCustomizations it works. zippy
Here is my location, if you customized the install location and are not happy with the orphan dir. "G:\VS_BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations" This is for VSCode2022. Just search "BuildCustomizations" inside the build tools installation dir if the path is different for you.
you just need to copy all the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\visual_studio_integration\MSBuildExtensions, and paste them to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations. These paths should be changed to your own.
Edit: If you do not have the VS IDE installed but are only using the build tools, say in conjunction with VS Code, the solution is about the same. The same directory exists inside of Visual Studio Build Tools:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations
I placed those 4 files there and it solved my problem. Thank you.
My error: No CUDA toolset found
Solution:
I copied the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\extras\visual_studio_integration\MSBuildExtensions
And pasted into C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations
In case this helps someone else: I was running from an elevated PowerShell window which does not seem to use my account's environment variables. Once I ran in a normal PowerShell window, it all worked.
you just need to copy all the four files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\extras\visual_studio_integration\MSBuildExtensions, and paste them to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations. These paths should be changed to your own.
I copied four files to the following directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations ", which successfully solved the problem. Thanks so much!
I copied four files to the following directory "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations ", which successfully solved the problem. Thanks so much!
Thank you, this is what finally worked for me! I had to take care I'm copying the files to the x86
directory on my PC for some reason. Would be cool if anyone could elaborate why this might be the case.
So in summary, copying the files to
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
or
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations
didn't work for me. What worked was copying them to:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations
Here is my location, if you customized the install location and are not happy with the orphan dir. "G:\VS_BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations" This is for VSCode2022. Just search "BuildCustomizations" inside the build tools installation dir if the path is different for you.
Thanks for your information, the path to "BuildCustomizations" is what really made it worked out for me.
I can't install tiny-cuda-nn neither with pip, nor building it with Cmake. However, Cmake produces at least a readable error:
I have CUDA 11.8 installed, CUDA_PATH is set properly. Microsoft Visual Studio 2019, Community Edition Nvidia A6000