Open Cuda project in VS

Source: Internet
Author: User

In the past, the use of Cuda in the Linux environment, write Cuda program, because a paper source requirements with win system +vs, first in VS Open, compile Cuda project, encountered some obstruction, hereby record.

My computer environment is win10,cuda7.5,vs2010. The first loaded vs2015, can not find NVCC, by Google, it seems vs2015 does not support Cuda.

1. First use the VS Open cuda solution or project, open the. sln file, and the project's file will appear on the left side of vs.

2. Right-click the project name, select Generate Custom option, select Cuda 7.5 in the window that appears

3. You will find the. cu and. cuh files have a red logo, right-click on the file, select Properties, on the left side of the popup window, click General, the right of "Exclude from Build" Select No, the item type Select Cuda C + +, click OK, the red logo will disappear.

3.CUDA Computing power settings: Right-click the project name, select Properties, select Configuration Properties on the left side of the pop-up window,--cuda C/c++--device, the Code generation option on the right, display the capability currently in use, to change the option to edit, Enter the one you want to change.

Then you can compile and run ...

Open Cuda project in VS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.