Transcription of CUDA C/C++ Streams and Concurrency - Nvidia
{{id}} {{{paragraph}}}
CUDA C/C++ Streams and ConcurrencySteve RennichNVIDIAC oncurrencyThe ability to perform multiple CUDA operations simultaneously(beyond multi-threaded parallelism)CUDA Kernel <<<>>>cudaMemcpyAsync (HostToDevice)cudaMemcpyAsync (DeviceToHost)Operations on the CPUF ermi architecture can simultaneously support(compute capability +)Up to 16 CUDA kernels on GPU2 cudaMemcpyAsyncs (must be in different directions)Computation on the CPUS treamsStreamA sequence of operations that execute in issue-order on the GPUP rogramming model used to effect concurrencyCUDA operations in different Streams may run concurrentlyCUDA operations from different Streams may be interleavedK1K2K3K4 Concurrency ExampleSerialConcurrent overlap kernel and D2H copycudaMemcpyAsync(H2D)cudaMemcpyAsync( D2H)Kernel<<<>>>timecudaMemcpyAsync(H2D) performance improvementstreamsHD2K2HD3DH2 Amount of ConcurrencySerial (1x)2-way Concurrency ()
Exceptions – asynchronous w.r.t. host Kernel launches in the default stream cudaMemcpy*Async cudaMemset*Async cudaMemcpy within the same device ... Three streams, each performing (HD, K, DH) Depth first 'usually' best for Fermi HD1 program H2D queue compute queue D2H queue HD1 K1 DH1 DH2 i s s u e o r d e r t i m e execution HD2 HD3 K1 …
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}