본문 바로가기

Parallel programming52

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.
CUDA Instructions (2) - Instruction 최적화 References Professional CUDA C Programming Contents Single-Precision vs. Double-Precision Standard vs. Intrinsic Functions Understanding Atomic Instructions CUDA Instructions (1) 지난 포스팅을 통해서 CUDA의 Instruction들을 살펴보고, 그 특징들을 알아봤습니다. 이 Instruction들을 통해, CUDA 프로그램에서 명령어들을 최적화할 때 많은 선택 사항들이 있다는 것을 알 수 있습니다. Single-Precision or Double-Precision Standard or Intrinsic Functions Atomic function or Unsaf.. 2022. 1. 28.
CUDA Instructions (1) References Professional CUDA C Programming Contents Floating-Point Instructions Intrinsic and Standard Functions Atomic Instructions 이번 포스팅에서 Instruction을 명령어로 지칭하도록 하겠습니다. Instructions(명령어)은 프로세서에서 로직의 단일 단위를 나타냅니다. CUDA에서 작업하면서 직접적으로 명령어을 다루는 일은 드물지만, CUDA 커널 코드로부터 다른 명령어들이 언제 생성되고, 어떻게 고급 언어 기능들이 명령어로 변환되는지 이해하는 것은 중요합니다. 기능이 같은 두 명령어 중의 하나를 선택하는 것은 성능, 정확성을 포함한 다양한 프로그램의 특성에 영향을 미칠 수 있습니다. 이.. 2022. 1. 26.
Streams and Events (3) - Kernel and Data Transfer, Stream Callback References Professional CUDA C Programming Contents Overlapping Kernel Execution and Data Transfer Overlapping GPU and CPU Execution Stream Callbacks Overlapping Kernel Execution and Data Transfer Streams and Events (1) Streams and Events (2) - Concurrent Kernels 이전 포스팅에서 CUDA의 스트림과 이벤트에 대해서 살펴보고, 여러 스트림에서 커널들을 어떻게 동시에 실행시킬 수 있는지 살펴봤습니다. 이번 포스팅에서는 먼저 kernel과 data transfer를 어떻게 동시에 실행할 수 있는지에 대해 .. 2022. 1. 25.
Streams and Events (2) - Concurrent Kernels References Professional CUDA C Programming Contents Concurrent Kernel Execution False Dependencies on Fermi Device Adjusting Stream Behavior using Environment Variables Blocking Behavior of the Default Stream Overlapping Kernel Execution and Data Transfer 지난 포스팅에서 CUDA의 Stream과 Event에 대해서 알아봤습니다. Streams and Events (1) 이번에는 여러 예제를 통해서 실제로 어떻게 동작하는지 살펴보는 시간을 갖도록 하겠습니다. Concurrent Kernels in Non-N.. 2022. 1. 24.
Streams and Events (1) References Professional CUDA C Programming Contents CUDA Streams CUDA Events Stream Synchronization CUDA Dynamic Parallelism (동적 병렬) CUDA Dynamic Parallelism (동적 병렬) References https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html Programming Massively Parallel Processors Contents Dynamic Parallelism Overview Memory Data Visibility Execution Environme.. junstar92.tistory.com 동적 병렬에 대한.. 2022. 1. 23.
Warp Shuffle Instruction References Professional CUDA C Programming Contents Warp Shuffle Instruction Parallel Reduction Using the Warp Shuffle Instruction The Warp Shuffle Instruction Kepler Architecture(compute capability 3.0 이상)부터, shuffle instruction이 도입되어 스레드들이 직접 동일 warp의 다른 스레드들의 레지스터를 읽을 수 있게 되었습니다. Shuffle Instruction은 warp 내의 스레드들이 global이나 shared memory를 사용하지 않고 직접적으로 서로 data를 교환할 수 있게 해줍니다. 또한, shared memory.. 2022. 1. 23.