GPU Programming for Beginners | ROCm + AMD Setup to Edge Detection
Автор: DigitalOcean
Загружено: 2026-02-23
Просмотров: 329
Описание:
In this hands-on tutorial, we demystify how GPUs compute and show you how to write your own GPU programs from scratch. Understanding GPU programming is essential for anyone looking to grasp why AI models depend on this specialized hardware.
We'll use ROCm and HIP (AMD's version of CUDA) to take you from zero to running real GPU code, culminating in a computer vision edge detector that processes images in parallel.
You can find the code in the project repository:
https://github.com/oconnoob/intro_to_...
👇 WHAT YOU'LL LEARN IN THIS VIDEO 👇
🔧 Getting Set Up with ROCm Two ways to get started: spin up a GPU Droplet on DigitalOcean with ROCm pre-installed, or install ROCm yourself on an Ubuntu system with an AMD GPU. We cover both methods step-by-step.
➕ Example 1: Vector Addition (The Basics) Learn the fundamental structure of GPU programs—kernels, threads, blocks, and memory management. We'll add one million elements in parallel and verify our results.
⚡ Example 2: Matrix Multiplication (Why Libraries Matter) Discover why optimized libraries like rocBLAS dramatically outperform naive implementations. This is the operation powering most AI models you use daily.
👁️ Example 3: Edge Detection with Sobel Filter (The Cool Stuff) Apply your GPU programming skills to a real computer vision problem—detecting edges in images using a classic Sobel filter, all running massively parallel on the GPU.
Whether you're an AI enthusiast wanting to understand the hardware layer or a developer looking to harness GPU compute power, this tutorial gives you the foundation to start writing efficient parallel programs.
🚀 Join DigitalOcean:
https://cloud.digitalocean.com/regist...
// STAY CONNECTED
🌏 Follow our blog for the latest updates: https://www.digitalocean.com/blog
🦈 Join our Developer Community on Discord: / discord
🐥 Follow us on X/Twitter: https://x.com/digitalocean
👩💻 We're Hiring! See open roles: http://grnh.se/aicoph1
------------------
TIMESTAMPS
0:00 Introduction
0:33 Setting up your GPU
0:54 Method 1: GPU Droplet
2:32 Method 2: Installing ROCm from scratch
3:50 Writing your first GPU program
4:24 Understanding GPU kernels
4:52 Writing the main program
5:40 How to allocate and fill GPU memory
6:30 Kernel launch and synchronization
7:47 Compiling and running the GPU Program
8:13 Example 2: Matrix multiplication
12:52 Final example: Image convolution and edge detection
14:04 Understanding the Sobel filter
15:43 Results
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: