























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Yu, Xuan Dept of Computer & Information Sciences University of Delaware
Shane Ryoo, Christopher I. Rodrigues, Sam S. Stone, Sara S. Baghsorkhi, Sain-Zee Ueng, and Wen-mei W. Hwu
Possible combination of optimization is very large and makes the optimization space tedious to explore Limited local resources and global memory bandwidth makes performance sensitive to even small changes in code, unpredictable
Introduction of execution hardware and threading model Compute Unified Device Architecture (CUDA)
Discussion of the space search process and the classifications and characteristics of the program optimizations
Discuss result of the search for several applications Matrix Multiplication Magnetic resonance Imaging Sums of Absolute Difference
Three Level Hierarchy:
Threads in a block are organized into warps of 32 threads. Each warp executes in SIMD fashion, issuing in four cycles on the eight SPs of an SM. When one wrap stall, SM switch to another warp
Consider an application:
Basic strategy for good performance: Reduce dynamic instruction count while maintaining high SP occupancy. Four categories of machine-level behavior to optimizae Thread-level work redistribution Instruction count reduction Intra-thread parallelism Resource balancing
Example of matrix multiplication The kernel is tiled so that each thread block computes a square 16- by-16 tile of the output matrix
Four categories of machine-level behavior to optimize Thread-level work redistribution Instruction count reduction Intra-thread parallelism Resource balancing Each thread compute two matrix elements instead of one, presents opportunities for eliminating redundant instructions previously distributed across threads
Four categories of machine-level behavior to optimize Thread-level work redistribution Instruction count reduction Intra-thread parallelism Resource balancing Traditional compiler optimizations such as common sub expression elimination, loop- invariant code removal, and loop unrolling.
Four categories of machine-level behavior to optimize Thread-level work redistribution Instruction count reduction Intra-thread parallelism Resource balancing Trade certain resource usages, some of which may be counterintuitive, to produce a better performing application. An example of this is using shared memory to buffer data for reuse, regardless of whether it is shared with other threads. Another example is proactive register spilling by the programmer. By reducing register usage, often a critical resource, more thread blocks can be assigned to each SM.
Introduction of execution hardware and threading model Compute Unified Device Architecture (CUDA)
Discussion of the space search process and the classifications and characteristics of the program optimizations
Discuss result of the search for several applications Matrix Multiplication Magnetic resonance Imaging Sums of Absolute Difference