本书介绍了学生和专业人员都适合的并行编程与GPU体系结构的基本概念,详细剖析了编写并行程序所需的各种技术,用案例研究说明了并行程序设计的整个开发过程,即从计算机思想开始,直到最终实现高效可行的并行程序。
作者结合自己多年从事并行计算课程教学的经验,以简洁、直观和实用的方式,详细剖析了编写并行程序所需的各种技术,并用丰富的案例说明了并行程序设计的整个开发过程,即从计算机思想开始,直到最终实现高效可行的并行程序。
与上一版相比,本版对书中内容进行全面修订和更新,更加系统地阐述并行程序设计,既介绍了基本并行算法模式,又补充了更多的背景资料,而且还介绍了一些新的实用编程技术和工具。具体更新情况如下:
并行模式:新增3章并行模式方面的内容,详细说明了并行应用中涉及的诸多算法。
CUDA Fortran:这一章简要介绍了针对CUDA体系结构的编程接口,并通过丰富的实例阐释CUDA编程。
OpenACC:这一章介绍了使用指令表示并行性的开放标准,以简化并行编程任务。
Thrust:Thrust是CUDA C/C++之上的一个抽象层。本版用一章的篇幅说明了如何利用Thrust并行模板库以最少的编程工作来实现高性能应用。
C++AMP:微软开发的一种编程接口,用于简化Windows环境中大规模并行处理编程。
NVIDIA的Kepler架构:探讨了NVIDIA高性能、节能的GPU架构的编程特性。
作者简介
David B.Kirk 美国国家工程院院士、NVIDIA Fellow,曾是NVIDIA公司首席科学家。他领导了NVIDIA图形技术开发,并使其成为当今最流行的大众娱乐平台,也是CUDA技术的创始人之一。2002年,他荣获ACM SIGGRAPH计算机图形成就奖,以表彰其在把高性能计算机图形系统推向大众市场方面所做出的杰出贡献。他拥有麻省理工学院的机械工程学学士学位和硕士学位,加州理工学院的计算机科学博士学位。Kirk博士是50项与图形芯片设计相关的专利和专利申请的发明者,发表了50多篇关于图形处理技术的论文,是可视化计算技术方面的权威。
Wen-Mei Hwu(胡文美) 拥有美国加州大学伯克利分校计算机科学博士学位,现任美国伊利诺伊大学厄巴纳-香槟分校(UIUC)协调科学实验室电气与计算机工程Jerry Sanders(AMD创始人)讲座教授、微软和英特尔联合资助的通用并行计算研究中心联合主任兼世界上第一个NVIDIA CUDA卓越中心首席研究员。胡教授是世界顶级的并行处理器架构与编译器专家,担任美国下一代千万亿级计算机——蓝水系统的首席研究员。他是IEEE Fellow、ACM Fellow。
计算机科学及应用
作者结合自己多年从事并行计算课程教学的经验,以简洁、直观和实用的方式,详细剖析了编写并行程序所需的各种技术,并用丰富的案例说明了并行程序设计的整个开发过程,即从计算机思想开始,直到最终实现高效可行的并行程序。
与上一版相比,本版对书中内容进行全面修订和更新,更加系统地阐述并行程序设计,既介绍了基本并行算法模式,又补充了更多的背景资料,而且还介绍了一些新的实用编程技术和工具。具体更新情况如下:
并行模式:新增3章并行模式方面的内容,详细说明了并行应用中涉及的诸多算法。
CUDA Fortran:这一章简要介绍了针对CUDA体系结构的编程接口,并通过丰富的实例阐释CUDA编程。
OpenACC:这一章介绍了使用指令表示并行性的开放标准,以简化并行编程任务。
Thrust:Thrust是CUDA C/C++之上的一个抽象层。本版用一章的篇幅说明了如何利用Thrust并行模板库以最少的编程工作来实现高性能应用。
C++AMP:微软开发的一种编程接口,用于简化Windows环境中大规模并行处理编程。
NVIDIA的Kepler架构:探讨了NVIDIA高性能、节能的GPU架构的编程特性。
(美)David B. Kirk Wen-mei W. Hwu 著:David B.Kirk 美国国家工程院院士、NVIDIA Fellow,曾是NVIDIA公司首席科学家。他领导了NVIDIA图形技术开发,并使其成为当今最流行的大众娱乐平台,也是CUDA技术的创始人之一。2002年,他荣获ACM SIGGRAPH计算机图形成就奖,以表彰其在把高性能计算机图形系统推向大众市场方面所做出的杰出贡献。他拥有麻省理工学院的机械工程学学士学位和硕士学位,加州理工学院的计算机科学博士学位。Kirk博士是50项与图形芯片设计相关的专利和专利申请的发明者,发表了50多篇关于图形处理技术的论文,是可视化计算技术方面的权威。 Wen-Mei Hwu(胡文美) 拥有美国加州大学伯克利分校计算机科学博士学位,现任美国伊利诺伊大学厄巴纳-香槟分校(UIUC)协调科学实验室电气与计算机工程Jerry Sanders(AMD创始人)讲座教授、微软和英特尔联合资助的通用并行计算研究中心联合主任兼世界上第一个NVIDIA CUDA卓越中心首席研究员。胡教授是世界顶级的并行处理器架构与编译器专家,担任美国下一代千万亿级计算机——蓝水系统的首席研究员。他是IEEE Fellow、ACM Fellow。
Programming Massively Parallel Processors, 2nd Edition
Chapter 1: Introduction
1.1 GPUs as Parallel Computers
1.2 Architecture of a Modern GPU
1.3 Why More Speed or Parallelism
1.4 Parallel Programming Languages and Models
1.5 Overarching Goals
1.6 Organization of the Book
Chapter 2: History of GPU Computing
2.1. Evolution of Graphics Pipelines
The Era of Fixed Function Graphics Pipeline
Evolution of Programmable Real-Time Graphics
Unified Graphics and Computing Processors
2.2. GPGPU: an Intermediate Step
Scalable GPUs
Recent Developments
Future Trends
Chapter 3: Introduction to CUDA
3.1. Data Parallelism
3.2. CUDA Program Structure
3.3. A Matrix-Matrix Multiplication Example
3.4. Device Memories and Data Transfer
3.5. Kernel Functions and Threading
3.6. Summary
Function Declarations
Kernel Launch
Predefined Variables
Runtime API
Chapter 4: CUDA Threads
4.1. CUDA Thread Organization
4.2. More on BlockIdx and ThreadIdx
4.3. Synchronization and Transparent Scalability
4.4. Thread Assignment
4.5. Thread Scheduling and Latency Tolerance
4.6. Summary
Chapter 5: CUDA Memories
5.1. Importance of Memory Access Efficiency
5.2. CUDA Device Memory Types
5.3. A Strategy for Reducing Global Memory Traffic
5.4. Memory as a Limiting Factor to Parallelism
5.5. Summary
Chapter 6: Performance Considerations
6.1. More on Thread Execution
6.2. Global Memory Bandwidth
6.3. Dynamic Partitioning of SM Resources
6.4. Data Prefetching
6.5. Instruction Mix
6.6. Thread Granularity
6.7. Measured Performance and Summary
Chapter 7: Floating-Point Considerations
7.1. Floating-Point Format
Normalized representation of M
Excess encoding of E
7.2. Representable Numbers
7.3. Special Bit Patterns and Precision
7.4. Arithmetic Accuracy and Rounding
7.5. Algorithm Considerations
7.6. Summary
Chapter 8: Application Case Study I – Advanced MRI Reconstruction
8.1. Application Background
8.2. Iterative Reconstruction
8.3. Computing FHd
Step 1: Determine the Kernel Parallelism Structure
Step 2: Getting Around the Memory Bandwidth Limitation
Step 3: Use Hardware Trigonometry Functions
Step 4: Experimental Performance Testing
8.4. Final Evaluation
Chapter 9: Application Case Study II – Molecular Visualization and Analysis
9.1. Application Background
9.2. A Simple Kernel Implementation
9.3. Instruction Execution Efficiency
9.4. Memory Coalescing
9.5. Additional Performance Comparisons
9.6. Using Multiple GPUs
Chapter 10: Parallel Programming and Computational Thinking
10.1. Goals of Parallel Programming
10.2. Problem Decomposition
10.3. Algorithm Selection
10.4. Computational Thinking
Chapter 11: A Brief Introduction to OpenCL
11.1. Background
11.2. Data Parallelism Model
11.3. Device Architecture
11.4. Kernel Functions
11.5. Device Management and Kernel Launch
11.6. Electrostatic Potential Map in OpenCL
11.7. Summary
Chapter 12: Conclusion and Future Outlook
12.1. Goals Revisited
12.2. Memory Architecture Evolution
12.3. Kernel Execution Control Evolution
12.4. Core Performance
12.5. Programming Environment
12.6. A Bright Outlook
Appendix A: Matrix Multiplication Example Code
Appendix B: Speed and feed of current generation CUDA devices