กลับสู่คอร์สเรียน
AI032 มืออาชีพ

การเขียนโปรแกรมโปรเซสเซอร์แบบขนานขนาดใหญ่: แนวทางปฏิบัติจริง

หลักสูตรนี้ให้การแนะนำอย่างละเอียดเกี่ยวกับการคำนวณบนหน่วยประมวลผลกราฟิก (GPU) และการเขียนโปรแกรมแบบขนานโดยใช้สภาพแวดล้อม CUDA C ครอบคลุมสถาปัตยกรรม GPU การประมวลผลแบบขนานของข้อมูล การจัดการเธรด การปรับปรุงหน่วยความจำ และประเด็นเรื่องประสิทธิภาพขั้นสูง พร้อมยกตัวอย่างกรณีศึกษาจริง เช่น การสร้างภาพจากการถ่ายภาพด้วยแม่เหล็กไฟฟ้า (MRI) และการมองเห็นโมเลกุล

4.9
36.0h
569 ผู้เรียน
12 lessons
0 การถูกใจ
ปัญญาประดิษฐ์
เริ่มเรียน

ภาพรวมคอร์สเรียน

📚 สรุปเนื้อหา

หลักสูตรนี้ให้การแนะนำอย่างละเอียดเกี่ยวกับการประมวลผลบนหน่วยประมวลผลกราฟิก (GPU) และการเขียนโปรแกรมแบบขนานโดยใช้สภาพแวดล้อม CUDA C โดยครอบคลุมสถาปัตยกรรม GPU การทำงานแบบขนานข้อมูล การจัดการเธรด การปรับปรุงหน่วยความจำ และประเด็นเรื่องประสิทธิภาพขั้นสูง พร้อมยกตัวอย่างกรณีศึกษาจริง เช่น การกู้คืนภาพ MRI และการมองเห็นโมเลกุล

เชี่ยวชาญศิลปะของการประมวลผลขนานที่มีประสิทธิภาพสูง ด้วยแนวทางปฏิบัติจริงในการใช้ CUDA และสถาปัตยกรรม GPU

ผู้แต่ง: David B. Kirk, Wen-mei W. Hwu

ขอบคุณ: Ian Buck, John Nickolls, ทีม NVIDIA DevTech, Jensen Huang, David Luebke, Bill Bean, Simon Green, Mark Harris, Manju Hedge, Nadeem Mohammad, Brent Oster, Peter Shirley, Eric Young, และ Cyril Zeller

🎯 เป้าหมายการเรียนรู้

  1. แยกแยะปรัชญาการออกแบบและแนวโน้มประสิทธิภาพระหว่างโปรเซสเซอร์หลายคอร์ (multicore CPU) และโปรเซสเซอร์หลายหน่วย (many-core GPU)
  2. ระบุองค์ประกอบหลักของสถาปัตยกรรม GPU สมัยใหม่ รวมถึง Streaming Multiprocessors (SMs) และโครงสร้างหน่วยความจำ
  3. ประยุกต์ใช้กฎของ Amdahl เพื่อคำนวณความเร็วที่เป็นไปได้ทางทฤษฎี และระบุผลกระทบจากจุดที่ทำให้เกิดความล่าช้าในส่วนลำดับ
  4. เปรียบเทียบ ความแตกต่างทางสถาปัตยกรรมระหว่างเส้นทางการทำงานแบบคงที่ (fixed-function pipelines) กับอาร์เรย์โปรเซสเซอร์ที่สามารถเขียนโปรแกรมได้ (programmable unified processor arrays)
  5. อธิบาย บทบาทของ "GPGPU" เป็นขั้นตอนกลาง และข้อจำกัดของโมเดลการเขียนโปรแกรมชูดิโอ (shader programming) แบบดั้งเดิม
  6. วิเคราะห์ ว่าฟีเจอร์ฮาร์ดแวร์เช่น การดำเนินการแบบอะตอม (atomic operations), การซิงโครไนซ์แบบบาร์เรียร์ (barrier synchronization), และการรองรับเลขทศนิยมสองตำแหน่ง (double-precision support) สนับสนุนการเปลี่ยนผ่านสู่การประมวลผลทั่วไปที่ขยายขนาดได้
  7. ระบุและใช้ประโยชน์จากความขนานข้อมูลภายในอัลกอริธึมการคูณเมทริกซ์กับเมทริกซ์
  8. นำเสนอบริหารหน่วยความจำบนอุปกรณ์ (device memory management) รวมถึงการจัดสรร การถ่ายโอนข้อมูลระหว่างโฮสต์กับอุปกรณ์ และการปล่อยหน่วยความจำกลับ
  9. สร้างและเริ่มต้นเคอร์เนลใน CUDA โดยใช้การดัชนีเธรดและการกำหนดโครงสร้างกริด/บล็อกที่เหมาะสม
  10. ออกแบบ โครงสร้างระดับเธรดแบบหลายมิติ (กริดและบล็อก) เพื่อจับคู่โครงสร้างข้อมูลที่ซับซ้อนเข้ากับฮาร์ดแวร์ GPU

บทเรียน 共 12 课时 · 预计 36.0h

บทเรียน

Lesson

This lesson explores the evolution of parallel computing, highlighting the "Great Divergence" where GPUs surpassed CPUs in performance by prioritizing throughput-oriented architecture over sequential latency. Students will learn to differentiate between these processing models, understand the impact of the "Power Wall" on CPU design, and analyze how GPU transistor budgeting enables massive parallel computation.

This lesson explores the evolution of GPU architecture, focusing on the "real-time imperative" that necessitated a shift from serial CPU processing to parallel hardware acceleration. Students will learn how early innovations like SLI and the "wide and slow" design philosophy enabled the high-throughput performance required to meet strict frame-time budgets in modern computing.

This lesson explores the CUDA execution model, focusing on the architectural differences between the latency-optimized CPU (Host) and the throughput-optimized GPU (Device). Students will learn how to manage the lifecycle of a CUDA kernel, implement memory allocation using cudaMalloc and cudaMemcpy, and organize threads into grids and blocks to perform parallel computations.

This lesson explores the fundamentals of CUDA kernel execution, focusing on the transition from CPU-based iteration to data-centric GPU parallelism. Students will learn to implement the global indexing formula, manage execution configurations for transparent scalability, and apply boundary guards to ensure safe memory access across multidimensional data.

This lesson explores the "Memory Wall" in GPU computing, where computational throughput outpaces memory bandwidth, creating a significant performance bottleneck. Students will learn to mitigate these constraints by implementing shared memory tiling strategies, optimizing data reuse, and managing hardware resource limits to maximize occupancy.

This lesson explores the SIMT execution model, focusing on how hardware organizes threads into 32-thread warps and linearizes them for efficient scheduling. Students will learn to evaluate performance through warp partitioning, branch divergence analysis, and memory access patterns to optimize GPU kernel utilization.

This lesson explores how Excess Encoding (biased representation) enables high-speed hardware sorting by ensuring that bit patterns maintain a monotonic relationship with their numerical values. By replacing the sign-bit discontinuity of Two's Complement with this biased format, engineers can utilize simple, efficient unsigned comparators to perform rapid operations like Z-buffering in parallel processors.

This lesson explores the computational challenges of non-Cartesian MRI reconstruction, where spiral trajectories require iterative solvers or gridding instead of standard Fast Fourier Transforms. Students will learn how to overcome these bottlenecks by leveraging GPU-based massive parallelism, specifically focusing on voxel-to-thread mapping to optimize reconstruction speed for time-sensitive clinical applications like Sodium MRI.

This lesson explores the use of Direct Coulomb Summation (DCS) and GPU acceleration to generate electrostatic potential maps for molecular visualization. Students will learn to optimize rendering pipelines through techniques like loop unrolling and constant memory broadcasting to efficiently handle large-scale atomic data.

This lesson explores the transition from sequential processing to parallel computing, emphasizing how computational thinking helps overcome the power wall and frequency limits. Students will learn to evaluate parallel algorithm performance, manage the trade-offs between numerical precision and execution speed, and apply problem decomposition to optimize distributed systems.

This lesson introduces the OpenCL framework as a solution for managing heterogeneous computing environments, where a host CPU orchestrates tasks across diverse accelerators like GPUs and FPGAs. Students will learn to utilize the OpenCL platform layer for hardware discovery, understand the device model's hierarchy, and implement portable, efficient kernels that adapt to different architectural requirements.

This lesson explores the evolution of GPU architecture from graphics-focused designs to the compute-first Fermi generation, which introduced unified memory hierarchies and IEEE 754-2008 compliance. Students will learn how these advancements, including hardware-managed caching and improved thread scheduling, enable complex scientific computing and general-purpose programming beyond traditional 2D grid tasks.