Visual studio integration сбой cuda
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Hi all. This is my third day struggling with compiling a simple HelloCuda CUDA project in visual studio 2019 (Enterprise). I installed the latest Nvidia CUDA 10.1 Toolkit without errors. Please see the 'Error List'. I cannot work out what this error means except that it appears the target (versions) between MSVC & CUDA Toolkit 10.1 might be mismatching and I really do not know what how to resolve that. These are the only errors I get.
Thank you in advance for the your help.
Answers
Great joy! After working all night on re-installing my system and the NVIDIA CUDA package, my project now works.
Step 1: Update NVIDIA Graphics Card to the latest update.
Step 2: Install CUDA Toolkit 10.1 using Custom Installation - then unticking the Driver Options
Step 3: Install Nsight visual studio 2019.3 which replaces the outdated Nsight visual studio it installed in Step 2
Step 4: Add the folder to MSCV to the PATH in environment variables
I can now compile from within Visual Studio and through the command line as you instructed.
Thank you a million for your support. This had to work because its part of a project I have been working on for 4 years.
- Proposed as answer by Perry Qian-MSFT Microsoft contingent staff Thursday, September 12, 2019 7:12 AM
- Marked as answer by NVIDIA Cuda 10.1 - Visual Studio 2019 Problem Thursday, September 12, 2019 3:00 PM
All replies
Welcome to the MSDN forum.
According to your description, maybe you have lost the environment of building the CUDA and build version inconsistency.
First, you should add the path of cl.exe environment variables into the Path.Since there are two versions of cl.exe platform, you would better choose the x64 version like:
When you build your project, type the command line like
If so, please set the "/ FS" in the project and add this below in CUDA 10.1 props.
You can refer to this article:
Hope it could help you.
- Edited by Perry Qian-MSFT Microsoft contingent staff Wednesday, September 11, 2019 7:10 AM
Thanks for your advice. I have just completed a clean installation of my laptop and have added VS2019 without issues. I'm waiting for a response from NVIDIA regarding the actual steps of installing ethe CUDA Toolkit. I might just be misunderstanding the information, but it's rather confusing as the CUDA Toolkit 10.1 seems to contain other installations as well, Drivers and Nsight visual studio edition, which are in themselves part of the 3-Step process.
Step 1: Install Recommended Drivers
Step 2: Install CUDA Toolkit 10.1 Update 2
Step 3: Install Nsight visual studio edition
Step 2 contains installations of Step 1 and Step 3, so why not just instruct to download and install CUDA Toolkit 10.1 Update, which takes care of the entire process. I hope I'm making sense.
After re-installing the CUDA toolkit, I'll let you know if that bug rears its ugly head again. Your explanations of possibilities make perfect sense. I tried several fixes from the web, but just could not resolve this problem.
I'm trying to install CUDA, but I get a message saying "No supported version of visual studio was found". I think that this is because I am using Visual Studio 2017 (Community), and CUDA currently only supports up to Visual Studio 2015. Unfortunately, Microsoft will not allow me to download old versions of Visual Studio without paying a subscription fee.
Is there a way I can get around the compatibility issue with VS 2017, or can I not use CUDA?
You can download older versions of visual studio here. Yes, you have to join the dev essentials program, but it is free.
8 Answers 8
- If you want to install CUDA 8.0 with Visual Studio 2017 you need to install additional components for Visual Studio 2017.
Click on the Start Menu and type Visual Studio Installer. Open Visual Studio Installer
- Download full CUDA toolkit distribution and extract it somewhere on your disk.
- If you didn't have CUDA toolkit installed, do it now. If you have only Visual Studio 2017 installed, unselect Visual Studio integration checkbox.
Now you want to receive the "No supported version of the visual studio was found" error.
But in order to successfully build Cuda toolkit projects in Visual Studio 2017 , you also need to follow steps 5 and 6.
- Go to the CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions
folder in your extracted distribution, copy all the files and paste them to
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\BuildCustomizations:
- In the last step, you will need to edit your Cuda projects to recognize NVidia's build tasks from Visual Studio 2017 . Open your .vcxproj file in a text editor and find all occurrences of CUDA 8.0.props . Replace the macro at the beginning of the string with $(VCTargetsPath14) so that XML snippet would look as follows:
Don't forget to edit the custom targets path at the end of the file:
Make sure to double check your path conifuration!
If you use nvcc from command prompt you might not be calling cl.exe from Visual Studio folder!
Есть ли способ обойти проблему совместимости с VS 2017, или я не могу использовать CUDA?
Решение
- Если вы хотите установить CUDA 8.0 с Visual Studio 2017 вам нужно установить дополнительные компоненты для Visual Studio 2017.
Нажмите на меню «Пуск» и введите установщик Visual Studio. Откройте установщик Visual Studio
открыто Individual components вкладка и выберите VC++ 2015.3 v140 toolset
Теперь вы хотите получить "No supported version of visual studio was found" ошибка.
Но для успешной сборки проектов инструментария Cuda в Visual Studio 2017 вам также необходимо выполнить шаги 5 и 6.
- Перейти к CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions
папку в распакованном дистрибутиве, скопируйте все файлы и вставьте их в
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\BuildCustomizations:
- На последнем шаге вам нужно будет отредактировать ваш Cuda проекты по распознаванию задач сборки NVidia от Visual Studio 2017 , Открыть свой .vcxproj файл в текстовом редакторе и найти все вхождения CUDA 8.0.props , Заменить макрос в начале строки $(VCTargetsPath14) так что фрагмент XML будет выглядеть следующим образом:
Не забудьте отредактировать путь пользовательских целей в конце файла:
Удостоверьтесь, что дважды проверили свою конифурацию пути!
Если вы используете nvcc из командной строки вы не можете звонить cl.exe от Visual Studio папка!
Теперь вы можете создать свой проект Cuda из Visual Studio 2017.
Части этого решения от Блог Олега Тарасова .
Другие решения
На данный момент, похоже, Microsoft все еще выпускает версию сообщества VS2015 Update 2. Вы должны присоединиться к программе «dev essentials», но она кажется бесплатной.
Я смог загрузить установщик с Вот относительно недавно.
Вам также может понадобиться добавить следующее в свои списки CMakeLists:
list(APPEND CUDA_NVCC_FLAGS --cl-version=2017)
Для людей, видящих это последнее.
Сначала попробуйте установить CUDA 10 (CUDA Toolkit 10.0).
Если он все еще не работает без каких-либо модов, убедитесь, что у вас есть столько наборов инструментов VC ++, сколько вы видите в списке. Проверять, выписываться это видео , остановитесь в 8:41 и сравните списки.
Если по какой-то причине вам нужно использовать CUDA 9.0 — 9.2, вам нужно будет сделать несколько прыжков:
- Для сборок cmd установите vcvars_ver = 14.11 — увидеть этот ответ
- Для сборок IDE установите Platform Toolset (в свойствах проекта — Общие) в
- Visual Studio 2017 (v141)) или
- Visual Studio 2015 (v140))
Для того, чтобы получить работающий компилятор Cuda nvcc в оболочке windows нужно сделать следующее
установить правильную версию набора инструментов из отдельного компонента для VS 2017 — VC++ 2017 version 15.4 v.14.11 toolset
Запустите в оболочке Windows следующие "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11
Вы можете скомпилировать nvcc код без ошибок из оболочки Windows
Я столкнулся с той же проблемой, используя CUDA 9.1 и VS2017 Enterprise.
После изменения компилятора VC ++ на v140 (вместо 141) все работает нормально.
Но это не перестанет показывать ошибку.
Понятия не имею почему, но попытки запустить его на VS2015 приводят к ошибкам о том, что v141 не устанавливается … поэтому из-за какой-то извращенной логики я пытался не использовать v141 там, где он был установлен … и все работало !!
Оставьте это здесь, так как это может помочь кому-то еще в такой же ситуации. (хотя я действительно не понимаю, почему, как, когда, кто или что из решения.
Последнее обновление (правильное по состоянию на 12/12/2018) последняя версия Cuda — 9.2, а последняя версия Visual Studio — 2017.7 НЕ работают вместе. Инструкции, приведенные в решении выше, не работают. Вот что сработало для меня:
Перейти к отдельным компонентам. Нажмите на Windows 10 SDK 10.0.15063
введите описание изображения здесьЯ хотел отредактировать свои программы CUDA с помощью текстового редактора (то есть Sublime) и скомпилировать их из командной строки, но я столкнулся с ошибкой компилятора nvcc. Я установил Visual Studio 2017 с ОС Windows 10, но после компиляции он сказал, что «разрешены только версии VS 2012, 13, 15 и 17». Итак, что я сделал, так это вставил инструментарий VC ++ 2015 из установочного пакета установщика VS 2017 (см. Изображение в верхнем посте). Вместо этого я не прошел весь его процесс, я только скопировал путь моего файла cl.exe из только что созданной папки VS 14.0 в переменную среды. .Exe можно найти здесь:
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Hi all. This is my third day struggling with compiling a simple HelloCuda CUDA project in visual studio 2019 (Enterprise). I installed the latest Nvidia CUDA 10.1 Toolkit without errors. Please see the 'Error List'. I cannot work out what this error means except that it appears the target (versions) between MSVC & CUDA Toolkit 10.1 might be mismatching and I really do not know what how to resolve that. These are the only errors I get.
Thank you in advance for the your help.
Answers
Great joy! After working all night on re-installing my system and the NVIDIA CUDA package, my project now works.
Step 1: Update NVIDIA Graphics Card to the latest update.
Step 2: Install CUDA Toolkit 10.1 using Custom Installation - then unticking the Driver Options
Step 3: Install Nsight visual studio 2019.3 which replaces the outdated Nsight visual studio it installed in Step 2
Step 4: Add the folder to MSCV to the PATH in environment variables
I can now compile from within Visual Studio and through the command line as you instructed.
Thank you a million for your support. This had to work because its part of a project I have been working on for 4 years.
- Proposed as answer by Perry Qian-MSFT Microsoft contingent staff Thursday, September 12, 2019 7:12 AM
- Marked as answer by NVIDIA Cuda 10.1 - Visual Studio 2019 Problem Thursday, September 12, 2019 3:00 PM
All replies
Welcome to the MSDN forum.
According to your description, maybe you have lost the environment of building the CUDA and build version inconsistency.
First, you should add the path of cl.exe environment variables into the Path.Since there are two versions of cl.exe platform, you would better choose the x64 version like:
When you build your project, type the command line like
If so, please set the "/ FS" in the project and add this below in CUDA 10.1 props.
You can refer to this article:
Hope it could help you.
- Edited by Perry Qian-MSFT Microsoft contingent staff Wednesday, September 11, 2019 7:10 AM
Thanks for your advice. I have just completed a clean installation of my laptop and have added VS2019 without issues. I'm waiting for a response from NVIDIA regarding the actual steps of installing ethe CUDA Toolkit. I might just be misunderstanding the information, but it's rather confusing as the CUDA Toolkit 10.1 seems to contain other installations as well, Drivers and Nsight visual studio edition, which are in themselves part of the 3-Step process.
Step 1: Install Recommended Drivers
Step 2: Install CUDA Toolkit 10.1 Update 2
Step 3: Install Nsight visual studio edition
Step 2 contains installations of Step 1 and Step 3, so why not just instruct to download and install CUDA Toolkit 10.1 Update, which takes care of the entire process. I hope I'm making sense.
After re-installing the CUDA toolkit, I'll let you know if that bug rears its ugly head again. Your explanations of possibilities make perfect sense. I tried several fixes from the web, but just could not resolve this problem.
There was such a prompt when installing CUDA recently,The flowing processes must be stopped before the CUDA Visual studio integration installation can proceed Performance Monitor(ProcessID: 12244), so I found various processes with Monitor in the process browser and ended. Clicking to retry the installation again, the same error is still displayed.
The final solution is: return to the installation options section, don't choose condensed, choose the following custom installation, and then the next step, and finally the installation is successful!
Intelligent Recommendation
Visual Studio 2017 + CUDA 9.2 + OpenCV 3.4.5 installation and configuration tutorial (transfer)
1. Install Visual Studio 2017 CheckVC++ 2015.3 v14.00(v140) toolset for desktop 2. InstallationCUDA 9.2 Install Base Installer first Install Patch 1 again (Released Aug 16, 2018) .
Open visual studio project cuda error
When it comes to cuda updated version, written before cuda project may fail to load. For example, when originally written cuda project, which installed a computer cuda 8.0, later updated to cuda 9.0, .
The Visual Studio 2019 CUDA and OpenGL environment to build
The Visual Studio 2019 CUDA and OpenGL environment to build Visual Studio Installation inVS 2019 download linkIn Visual Studio opening the drop-down menu, select Community 2019, go to the download pag.
VS Visual Studio creates CUDA, compile
The generation of this issue is based on the fact: There are Visual Studio, with CUDA's SDK, the developer of Cuda's SDK, to move the version of VS. When an older CUDA driver is installed, the configu.
Solution "Microsoft Visual Studio 2008 has stopped working" in
Work computer has been installed VS2012, VS2008 open then reported the following error, can not use. Solution: Start -> All Programs -> Microsoft Visual Studio 2008 -> Visual Studio Tools -&g.
More Recommendation
Visual studio installer stopped the progress bar when installing vs2019 (solved!)
Visual studio installer has no progress bar after opening, all data is zero My computer was reinstalled once, and when I reinstalled visual studio2019, I found that there was no progress bar after the.
FxCop and Visual Studio X integration
FxCop and StyleCop are similar to each other to constrain our coding specification. For the difference between the two and the Code Analysis that comes with VS, you can refer to the blog post in front.
Visual studio integration failed solution
I tried two solutions, and I found it reliable, but both failed. The first: fromThisBlog post. The result failed. The second kind: fromThisBlog post. It also failed, but I referenced some of these pra.
Native controller process has stopped - no new native processes can be started
VS 2019 update failed: The installer requires restarting the computer before you can run Visual Studio.
Always ask to restart your computer, actually, restart. Modify the logo in the registry to 0. Path: \ HKEY_LOCAL_MACHINE \ Software \ WOW6432Node \ Microsoft \ VisualStudio \ setup \ reboot.
Читайте также: