본문 바로가기

CUDA11

Stream Synchronization Behavior References CUDA Toolkit Documentation - CUDA Runtime API (link) Contents Legacy Default Stream Per-thread Default Stream [프로그래밍/CUDA] - API Synchronization Behavior API Synchronization Behavior References CUDA Toolkit Documentation - CUDA Runtime API (link) Contents Difference between the driver and runtime APIs API Synchronization Behavior 이번 포스팅에서는 CUDA의 API에 대한 동기/비동기.. junstar92.tistory.com .. 2022. 6. 19.
API Synchronization Behavior References CUDA Toolkit Documentation - CUDA Runtime API (link) Contents Difference between the driver and runtime APIs API Synchronization Behavior 이번 포스팅에서는 CUDA의 API에 대한 동기/비동기 동작에 대해서 살펴보려고 합니다. 아마 기본적으로 Memcpy와 Kernel Launch를 오버랩할 때, 스트림을 사용하여 비동기로 분할하여 수행하면 성능이 더 좋다는 것을 알고 있으리라 생각됩니다. 이에 대한 내용은 이전 포스팅들을 참조하시길 바랍니다 ! 아래 포스팅에서는 스트림을 사용하여 Copy/Compute를 오버랩하는 방법에 대한 내용이 포함되어 있습니다. CUDA C/C++ 기.. 2022. 6. 18.
Multiple GPUs with CUDA C++ References Scaling Workloads Across Mutliple GPUs with CUDA C++ Contents Concurrency Strategies Multiple GPUs Use non-default Streams with Multiple GPUs 이번 포스팅에서는 NVIDIA Online Training 중 다중 GPU를 사용하는 방법에 대한 강의, Scaling Workloads Across Multiple GPUs with CUDA C++에 대한 내용을 정리하였습니다. Concurrency Strategies 일반적으로 GPU Programming은 다음의 3 Steps로 구성됩니다. Transfer data to GPU device(s) Perform computation.. 2022. 6. 16.
CUDA C/C++ 기초 - (3) References Fundamentals of Accelerated Computing with CUDA C/C++ (NVIDIA Online Training) Asynchronous Streaming, and Visual Profiling for Accelerated Applications with CUDA C/C++ Contents Concurrent CUDA Streams Manual Device Memory Allocation and Copying Using Streams to Data Transfers CUDA C/C++ 기초 - (1) CUDA C/C++ 기초 - (2) 지난 두 포스팅을 통해서 기본적인 CUDA와 Unified Memory에 대해서 살펴봤습니다. 또한, Nsight Syste.. 2022. 6. 14.
CUDA C/C++ 기초 - (2) References Fundamentals of Accelerated Computing with CUDA C/C++ (NVIDIA Online Training) Managing Accelerated Application Memory with CUDA Unified Memory and nsys Contents Nsight System Understanding Streaming Multiprocessors Querying the Device Unified Memory Details CUDA C/C++ 기초 - (1) CUDA C/C++ 기초 - (1) References Fundamentals of Accelerated Computing with CUDA C/C++ (NVIDIA Online Training.. 2022. 6. 13.
CUDA C/C++ 기초 - (1) References Fundamentals of Accelerated Computing with CUDA C/C++ (NVIDIA Online Training) Contents Writing Application Code for the GPU(CUDA C/C++) CUDA Thread Hierarchy Allocating Memory to be accessed on the GPU and the CPU Grid Size Mismatch Grid-Stride Loops Error Handling CUDA를 공부하면서 여러 포스팅들을 작성했었는데, 최근까지 CUDA를 자주 사용하지는 않아서 잊어버린 부분들이 많았습니다. 우연히 NVIDIA Online Training를 접할 수 있는 기회가 생겨서, 이번 기회.. 2022. 6. 10.
리소스 동적 분할 및 제한 사항 (+ device query) References Programming Massively Parallel Processors Contents SM 리소스의 동적 분할 (Dynamic Partitioning) 리소스 간의 제한사항 (limitations) CUDA Device Query SM(Streaming multiprocessor)의 실행 리소스는 레지스터(registers), 공유 메모리(shared memory), 스레드 블록 슬롯(thread block slots), 스레드 슬롯(thread slot)을 포함합니다. 이 리소스들은 동적으로 분할되고 스레드에게 할당되어 수행될 때 사용됩니다. 스레드 슬롯과 블록 슬롯 Fermi 아키텍처의 경우에는 1536개의 스레드 슬롯이 있습니다. 이 스레드 슬롯은 분할되어 런타임에 스레드 .. 2021. 12. 10.
Global Memory 대역폭(bandwidth) 활용 References Programming Massively Parallel Processors Contents Global Memory Bandwidth Memory Coalescing Technique (메모리 병합 기법) 지난 포스팅들에서 전역 메모리가 아닌 공유 메모리를 사용하는 Tiling 기법을 사용하여 행렬 곱 연산의 성능을 향상시켜봤습니다. 이렇듯 CUDA에서 제공할 수 있는 메모리들을 잘 사용하면, 더 좋은 성능은 갖는 프로그램을 만들 수 있습니다. TILING 최적화 for 메모리 Access (tiled matrix multiplication) TILING 최적화 for 메모리 Access (tiled matrix multiplication) References Programming M.. 2021. 12. 8.
CUDA Thread 구조와 Data Mapping (예제 : 이미지 흑백, Blur 처리) References Programming Massively Parallel Processors CUDA Toolkit Documentation https://github.com/nvidia/cuda-samples Contents CUDA Thread Organization Built-in variables : threadIdx, blockIdx, blockDim, gridDim Mapping threads to multidimensional data CUDA Thread Organization 지난 포스팅에서 기본적인 CUDA 프로그래밍에 대한 것들을 살펴보고, 예제로 vector addition을 구현해보았습니다. CUDA 프로그래밍 기초 (예제 : vector addition) CUDA 프로그래밍 기.. 2021. 12. 2.
GPU와 CUDA References CUDA Toolkit Documentation Programming Massively Parallel Processors Contents CPU와 GPU, CUDA 도입 간략한 GPU Architecture 이번 포스팅을 시작으로 GPU에 관련하여 기본적인 것들을 먼저 알아보고, CUDA 프로그래밍에 대해서 알아보려고 합니다. 원래는 바로 CUDA 프로그래밍에 대해 포스팅을 해보려고 했으나, 이것저것 알아보면서 GPU 프로그래밍에 토대가 되는 내용들이 중요할 것 같아서 조금 지루하고, 저도 아직 완전히 이해하지 못한 내용들을 알아보면서 이해하려고 합니다.. ! CPU와 GPU 차이 수년 동안, Intel Pentium이나 AMD Opteron 프로세서와 같은 단일 CPU를 이용한 마.. 2021. 11. 30.