본문 바로가기
CUDA

Visual Studio 5/8 CUDA 세팅 방법

by leo21c 2009. 5. 16.
SMALL

1. CUDA SDK를 다운로드 받아 설치한다.

- C:\CUDA 폴더에 SDK 설치

2. Visual Studio 5/8를 실행한다.

3. Visual Studio 5/8 -> Debug -> Option ->텍스트 편집기(Text Editor) -> 파일 확장명(cu) 추가

4. cuda syntax highlight 등록(usertype.dat 등록)
- cuda sdk폴더에서usertype.dat 파일을 찾아 Visual Studio 5/8 IDE 폴더에
copy한다.
- C:\Program Files\Microsoft Visual Studio 8\Common7\IDE

5. project 생성
- 샘플로 exam1을 생성
- 사용자 지정 빌드 규칙에 cuda rules를 추가한다.(cuda v2.1이후)


6. 속성에서 linker(링커)에 각각 일반, 입력 부분에 종속성(Library)를 추가한다.





7. cuda rule 옵션을 변경해 가면서 테스트 한다.

<참고>

** VS 2003에서 CUDA Highlight 기능 추가 방법 **

Visual Studio 2003에서는 visual_studio_7 디렉토릴 내용을 넣으셔야 합니다.

usertype.dat를 넣으시고 같은 디렉토리의 reg 파일도 등록하시면 됩니다.

readme.txt를 살펴보시면 다음과 같습니다.

Visual Studio .Net / 7:

1. If you don't have a usertype.dat file in your Microsoft Visual Studio .Net\Common7\IDE folder, then copy the included usertype.dat file there. If you do, append the contents of the included usertype.dat onto the end of the .Net\Common7\IDE\usertype.dat

2. Open up the registry editor and go to the following location - HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions.

3. Copy the default value from the .cpp key.

4. Create a new key under the File Extensions with the name of .cu

5. Paste the value you just copied into the default value

6. Restart Visual Studio and your CUDA code should now have syntax highlighting

NOTE: You can use the install_cuda_highlighting_vs7.reg file to simplify the above steps 2-5. Simply double-click on the file and press OK when prompted.

LIST