본문 바로가기

CUDA3

CUDA 예제 프로그램 작성 및 실행 CUDA 예제 프로그램 작성 및 실행을 통한 CUDA 테스트https://jhui.github.io/2017/03/06/CUDA/ “CUDA Tutorial”Sample code in adding 2 numbers with a GPU Terminology: Host (a CPU and host memory), device (a GPU and device memory). This sample code adds 2 numbers together with a GPU: Define a kernel (a function to run on a GPU). Allocate & initialize the host data.jhui.github.io위 github 페이지를 작성해서 덧셈 연산을 GPU로 수행하도록 CUDA.. 2022. 4. 28.
CUDA Tool kit 설치 CUDA 설치 및 사용 튜토리얼은 인터넷에 검색하는것 보다, NVIDIA 공식 문서를 보는것이 가장 효율적인것 같다. https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html New | Project... NVIDIA-> CUDA->, then select a template for your CUDA Toolkit version. For examp" data-og-host="docs.nvidia.com" data-og-source-url="https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html" data-og-url="http.. 2022. 4. 28.
CUDA 2. Programming Model 원글 : https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#programming-model 2.1. Kernel (CUDA에서의 함수, N개의 thread에서 독립적으로 한번씩 실행되는 함수)Kernel이란 1회 호출 시, 복수개의 CUDA 쓰레드에서 동시에 실행되는 C++ 형식의 함수를 의미한다. Kernel은 CUDA C++에 포함되어 있다.  일반 C++ 함수는 1회 호철 시 1번 실행되는 것과 달리 Kernel은 1회 호출하더라도 복수번 실행되는 것이 특징이다. Kernel은 '__global__' 이라는 선언자를 통해 정의된다. Kernel 호출 시 실행되는 복수개의 Thread는 각각 ID가 부여된다. 실행될 Thread의 개수.. 2022. 4. 24.