1000sj
SJ CODE
1000sj
전체 방문자
오늘
어제
  • 분류 전체보기 N
    • Security N
      • 네트워크
      • 보안
      • CTF
      • Exploit
      • Fuzzing N
    • System Programming
      • Kernel
      • Operating System
      • Compiler
      • Device Driver
      • Emulator
      • Parrelel Processing
      • Assembly
    • Application Programming
      • Script
      • Android
    • Cloud Computing
      • Cloud Native
      • Public Cloud
      • Infrastructure
      • Database
      • DevOps
    • TroubleShooting
    • ETC
      • 문화 생활
      • 커뮤니티

인기 글

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
1000sj

SJ CODE

System Programming/Parrelel Processing

CUDA #0 환경 구성

2025. 9. 7. 21:11

1. Lab

nvidia-smi    
Sun Sep  7 20:37:56 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.94                 Driver Version: 560.94         CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4060 Ti   WDDM  |   00000000:01:00.0 Off |                  N/A |
|  0%   35C    P8              3W /  160W |       0MiB /   8188MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

 

2. NVIDIA 그래픽카드 드라이버 설치

1) NVIDIA 그래픽카드 드라이버 다운로드
- https://www.nvidia.co.kr/Download/index.aspx?lang=kr

 

3. CUDA toolkit 설치

1) 버전 확인

nvidia-smi    
Sun Sep  7 20:37:56 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.94                 Driver Version: 560.94         CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+

CUDA Version: 12.6

 

2) CUDA toolkit 다운로드 홈페이지 접속 후 해당 버전 설치
- https://developer.nvidia.com/cuda-toolkit-archive

 

3) 설치 확인

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Oct_30_01:18:48_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

 

4. 프로그램 실행

visual studio에서 cuda 프로그램 생성 후 코드 실행

#include "cuda_runtime.h"
#include "device_launch_parameters.h"

#include <stdio.h>

__global__ void test01() {
    int warpIDValue = 0;
    warpIDValue = threadIdx.x / 32;
    printf("\nblockIdx.x: %d, threadIdx.x: %d warpIDValue: %d", blockIdx.x, threadIdx.x, warpIDValue);
}

int main() {
    test01 << < 2, 64 >> > ();
    cudaDeviceSynchronize();
    return 0;
}

  • https://developer.nvidia.com/cuda-downloads

 

'System Programming > Parrelel Processing' 카테고리의 다른 글

SIMD #0 SIMD의 기본 개념과 병렬 처리 원리  (0) 2025.10.12
    'System Programming/Parrelel Processing' 카테고리의 다른 글
    • SIMD #0 SIMD의 기본 개념과 병렬 처리 원리
    1000sj
    1000sj

    티스토리툴바