ROCm

平行計算平台與應用程式介面

ROCm[3]超威半导体(AMD)用于圖形處理器(GPU)编程的软件栈。ROCm涉及多个领域:图形处理器通用计算(GPGPU)、高性能计算(HPC)和异构计算。它提供多种编程模型:HIP(基于GPU内核的编程)、OpenMP/訊息傳遞介面基于指令的编程)和OpenCL

ROCm
開發者AMD
首次发布2016年11月14日,​7年前​(2016-11-14
当前版本
  • 6.1.0 (2024年4月16日;穩定版本)[1]
編輯維基數據鏈接
源代码库github.com/ROCm/ROCm
编程语言CC++PythonFortranJulia
中间件HIP
操作系统LinuxWindows[2]
平台支持的GPU
文件大小<2 GiB
类型GPGPU库和API
许可协议MIT許可證
网站www.amd.com/en/products/software/rocm.html 编辑维基数据

ROCm是免费、自由和开源的软件(GPU固件除外[4]),以各种许可证发布。ROCm最初是Radeon Open Compute platform的缩写,但由于Open Compute已成为注册商标,ROCm已不再是缩写,而只是AMD为GPU计算设计的开源堆栈。

背景 编辑

ATI/AMD的第一個图形处理器通用计算(GPGPU)軟體堆疊是Close to Metal英语Close to Metal (CTM),後來成為Stream

ROCm於2016年左右[5]與玻爾茲曼計劃(Boltzmann Initiative)一起推出[6]。 ROCm 堆疊建立在先前的 AMD GPU 堆疊的基礎上,一些工具可追溯到GPUOpen英语GPUOpen,其他工具可追溯到異質系統架構英语Heterogeneous System Architecture (HSA)。

程式設計能力 编辑

ROCm 作為一個堆疊,範圍從核心驅動程式到最終用戶應用程式。 AMD 透過其學習入口網站提供有關 AMD GCN 硬體[[7]和 ROCm 程式設計[8]的介紹影片。[9]

迄今為止,有關堆疊和 ROCm/HIP 程式設計的最佳技術介紹之一仍然可以在 Reddit 上找到。[10]

硬體支援 编辑

ROCm 主要針對獨立專業 GPU[11], 但非官方支援包括 Vega 系列和RDNA 2消費級GPU。

AMD加速处理器(APU) 已“啟用”,但未獲得官方支援。 涉及到讓 ROCm 發揮作用。[12]

專業級GPU 编辑

AMD Instinct加速器是ROCm的一等公民,與專業消費者Radeon Pro英语Radeon Pro GPU系列一樣:它們大多得到全面支援。

截至2022年1月,唯一具有相對同等支援的消費級 GPU 是 Radeon VII(GCN 5 - Vega)。

消費級GPU 编辑

GPU系列名稱 南方
群島
海島 火山島 北極
群島/北極星
Vega Navi 1X Navi 2X
已發布 2012年1月 2013年9月 2015年6月 2016年6月 2017年6月 2019年7月 2020年11月
營銷名稱 Radeon HD 7000 Radeon Rx 200 Radeon Rx 300 Radeon RX 400/500 Radeon RX Vega/Radeon VII(7 nm) Radeon RX 5000 Radeon RX 6000
AMD支援    
指令集架構 GCN instruction set RDNA instruction set
微架構 GCN 1st gen GCN 2nd gen GCN 3rd gen GCN 4th gen GCN 5th gen RDNA RDNA 2
Type 统一着色器模型英语Unified Shader Model
ROCm[13]    [14]    [15]  
OpenCL 1.2 (on Linux: 1.1 (no Image support) with Mesa 3D) 2.0 (Adrenalin driver on Win7+)
(on Linux: 1.1 (no Image support) with Mesa 3D, 2.0 with AMD drivers or AMD ROCm)
2.0 2.1[16]
Vulkan 1.0
(Win 7+ or Mesa 17+)
1.2 (Adrenalin 20.1, Linux Mesa 3D 20.0)
Shader model 5.1 5.1
6.3
6.4 6.5
OpenGL 4.6 (on Linux: 4.6 (Mesa 3D 20.0))
Direct3D 11 (11_1)
12 (11_1)
11 (12_0)
12 (12_0)
11 (12_1)
12 (12_1)
11 (12_1)
12 (12_2)
/drm/amdgpu[a] Experimental[17]  
  1. ^ DRM(直接渲染管理器)是Linux内核的一個元件。

軟體生態系統 编辑

學習資源 编辑

AMD ROCm 產品經理 Terry Deem 介紹了該堆疊。[18]

第三方集成 编辑

該堆疊的主要消費者是機器學習和高效能運算/GPGPU 應用程式。

機器學習 编辑

各種深度學習框架都有 ROCm 後端:[19]

超級計算 编辑

ROCm 在TOP500計畫中獲得了顯著的吸引力[21]。 ROCm 與 Exascale 超級電腦El Capitan英语El Capitan (supercomputer)[22][23]前沿 (超級電腦)(Frontier) 一起使用。

一些相關軟體可以在AMD Infinity中心(AMD Infinity hub)找到。

與競爭對手的比較 编辑

ROCm 與其他GPU運算堆疊競爭:英偉達CUDA 和 Intel OneAPI英语oneAPI (compute acceleration)

英偉達CUDA 编辑

英偉達的CUDA是閉源的,而 AMD ROCm 是開源的。 有一些開源軟體建構在閉源CUDA之上,例如RAPIDS

CUDA 能夠在消費級 GPU 上運行,而 ROCm 支援主要為 AMD Instinct 和 AMD Radeon Pro 等專業硬體提供。

Nvidia 提供 Clang 前端及其Parallel Thread Execution (PTX) LLVM GPU 後端作為 Nvidia CUDA 編譯器 (Nvidia CUDA Compiler, NVCC)。

英特爾OneAPI 编辑

與ROCm一樣,oneAPI也是開源的,所有對應的函式庫都發佈在其GitHub頁面上

参见 编辑

参考资料 编辑

  1. ^ ROCm 6.1.0 Release. 2024年4月16日 [2024年4月16日]. 
  2. ^ New HIP SDK helps democratize GPU Computing. [2024-03-13]. (原始内容存档于2023-08-03). 
  3. ^ Question: What does ROCm stand for? · Issue #1628 · RadeonOpenCompute/ROCm. Github.com. [January 18, 2022]. (原始内容存档于2023-11-06). 
  4. ^ Debian -- Details of package firmware-amd-graphics in buster. Packages.debian.org. [January 18, 2022]. (原始内容存档于2023-03-31). 
  5. ^ AMD @ SC16: Radeon Open Compute Platform (ROCm) 1.3 Released, Boltzmann Comes to Fruition. anandtech.com. [January 19, 2022]. 
  6. ^ AMD @ SC15: Boltzmann Initiative Announced - C++ and CUDA Compilers for AMD GPUs. anandtech.com. [January 19, 2022]. 
  7. ^ Introduction to AMD GPU Hardware –通过www.youtube.com. 
  8. ^ Fundamentals of HIP Programming. (原始内容存档于2023-02-07). 
  9. ^ ROCm™ Learning Center. AMD. 
  10. ^ AMD ROCm / HCC programming: Introduction. December 26, 2018. 
  11. ^ AMD Documentation - Portal. 
  12. ^ Here's something you don't see every day: PyTorch running on top of ROCm on a 6800M (6700XT) laptop! Took a ton of minor config tweaks and a few patches but it actually functionally works. HUGE!. December 10, 2021. 
  13. ^ ROCm Getting Started Guide v5.2.3. 
  14. ^ HOW-TO: Stable Diffusion on an AMD GPU. September 23, 2022. 
  15. ^ Any update on 5700 Xt support?. GitHub. 
  16. ^ AMD Radeon RX 6800 XT Specs. TechPowerUp. [January 1, 2021]. 
  17. ^ Larabel, Michael. The Best Features of the Linux 4.9 Kernel. Phoronix. December 7, 2016 [December 7, 2016]. 
  18. ^ ROCm presentation. HPCwire.com. July 6, 2020 [January 18, 2022]. 
  19. ^ AMD Introduces Its Deep-Learning Accelerator Instinct MI200 Series GPUs. Infoq.com. [January 18, 2022]. 
  20. ^ Using CuPy on AMD GPU (experimental). 
  21. ^ AMD Chips Away at Intel in World's Top 500 Supercomputers as GPU War Looms. November 16, 2020. 
  22. ^ El Capitan Supercomputer Detailed: AMD CPUs & GPUs to Drive 2 Exaflops of Compute. 
  23. ^ Livermore's el Capitan Supercomputer to Debut HPE 'Rabbit' Near Node Local Storage. February 18, 2021.