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.