用户:MofuMoca/异构系统架构
异构系统架构(Heterogeneous System Architecture,HSA) ,是一种中央处理器与图形处理器共享汇流排、记忆体及处理程序的电脑处理器架构[1] HSA由HSA基金会开发,其中包含AMD及ARM。HSA起始目标是为了减少CPU、GPU以及其他计算单元之间的沟通延迟,并且从程式设计师的角度来看,[2]:3[3] 能够让许多设备更相容,减少程式设计师去规划资料在装置间所互不相通之记忆体中移动的程序(必须透过OpenCL或CUDA)。[4] 异构计算广泛地被使用在系统单晶片装置中,像是平板电脑、智慧型手机以及其他行动装置。[5] HSA允许程式使用图形处理器(GPU)去计算浮点数,而不须调度或独立的记忆体。[6]
概览
[编辑]HSA is a set of features defining a system architecture that intends to make heterogeneous computing more mainstream. Heterogeneous computing itself refers to systems that contain multiples processing units – central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), or any type of application-specific integrated circuits (ASICs). The system architecture allows any accelerator, for instance a graphics processor, to operate at the same processing level as the system's CPU.
Among its main features, HSA defines a unified virtual address space space for compute devices: where GPUs traditionally have their own memory, separate from the main (CPU) memory, HSA requires these devices to share page tables so that devices can exchange data by sharing pointers. This is to be supported by custom memory management units.[2]:6–7 To render interoperability possible and also to ease various aspects of programming, HSA is intended to be ISA-agnostic for both CPUs and accelerators, and to support high-level programming languages.
So far, the HSA specifications cover:
- HSA Intermediate Layer (HSAIL), a virtual instruction set for parallel programs
- similarTemplate:According to whom? to LLVM Intermediate Representation and SPIR (used by OpenCL and Vulkan
- finalized to a specific instruction set by a JIT compiler
- make late decisions on which core(s) should run a task
- explicitly parallel
- supports exceptions, virtual functions and other high-level features
- syscall methods (I/O, printf,[需要解释] etc.)
- debugging support
- HSA memory model
- compatible with C++11, OpenCL, Java and .NET memory models
- relaxed consistency
- designed to support both managed languages (e.g. Java) and unmanaged languages (e.g. C)
- will make it much easier to develop 3rd-party compilers for a wide range of heterogeneous products programmed in Fortran, C++, C++ AMP, Java, et al.
- HSA dispatcher and run-time
- designed to enable heterogeneous task queueing: a work queue per core, distribution of work into queues, load balancing by work stealing
- any core can schedule work for any other, including itself
- significant reduction of overhead of scheduling work for a core
Mobile devices are one of the HSA's application areas, in which it yields improved power efficiency.[5]
方块图
[编辑]The block diagrams below provide high-level illustrations of how HSA operates and compares to traditional architectures.
-
Standard architecture with a discrete GPU attached to the PCI Express bus. Zero-copy between the GPU and CPU is not possible due to distinct physical memories.
-
HSA brings unified virtual memory, and facilitates passing pointers over PCI Express instead of copying the entire data.
-
In partitioned main memory, one part of the system memory is exclusively allocated to the GPU. As a result, zero-copy operation are not possible.
-
Unified main memory, made possible by a combination of HSA-enabled GPU and CPU. As a result, it is possible to perform zero-copy operations.[7]
软体支援
[编辑]Some of the HSA-specific features implemented in the hardware need to be supported by the operating system kernel and specific device drivers. For example, support for AMD Radeon and AMD FirePro graphics cards, and APUs based on so-called Graphics Core Next (GCN), was merged into version 3.19 of the Linux kernel mainline, released on February 8, 2015.[9] Programs do not interact directly with amdkfd, but queue their jobs utilizing the HSA runtime.[10] This very first implementation, known as amdkfd, focuses on "Kaveri" or "Berlin" APUs and works alongside the existing Radeon kernel graphics driver.
Additionally, amdkfd supports so-called heterogeneous queuing (HQ), which aims to simplify the distribution of computational jobs among multiple CPUs and GPUs from the programmer's perspective. 截至2015年2月[update], support for heterogeneous memory management, suited only for graphics hardware featuring version 2 of the AMD's IOMMU, has not yet been accepted into the Linux kernel mainline.
Integrated support for HSA platforms has been announced for the "Sumatra" release of OpenJDK, due in 2015.[11]
AMD APP SDK is AMD's proprietary software development kit targeting parallel computing, available for Microsoft Windows and Linux. Bolt is a C++ template library optimized for heterogeneous computing.[12]
硬体支援
[编辑]截至2015年2月[update], only AMD's "Kaveri" A-series APUs (cf. "Kaveri" desktop processors and "Kaveri" mobile processors) and Sony's PlayStation 4 contain version 2 of the AMD's IOMMU.
参见
[编辑]参考资料
[编辑]- ^ Tarun Iyer. AMD Unveils its Heterogeneous Uniform Memory Access (hUMA) Technology. Tom's Hardware. 30 April 2013.
- ^ 2.0 2.1 George Kyriazis. Heterogeneous System Architecture: A Technical Review (PDF) (报告). AMD. 30 August 2012.
- ^ What is Heterogeneous System Architecture (HSA)?. AMD. [23 May 2014].
- ^ Joel Hruska. Setting HSAIL: AMD explains the future of CPU/GPU cooperation. ExtremeTech. Ziff Davis. 2013-08-26.
- ^ 5.0 5.1 Heterogeneous System Architecture: Purpose and Outlook. gpuscience.com. 2012-11-09 [2014-05-24]. (原始内容存档于2014-02-01).
- ^ Heterogeneous system architecture: Multicore image processing using a mix of CPU and GPU elements. Embedded Computing Design. [23 May 2014].
- ^ Kaveri microarchitecture. SemiAccurate. 2014-01-15.
- ^ Michael Larabel. AMDKFD Driver Still Evolving For Open-Source HSA On Linux. Phoronix. July 21, 2014 [January 21, 2015].
- ^ 9.0 9.1 Linux kernel 3.19, Section 1.3. HSA driver for AMD GPU devices. kernelnewbies.org. February 8, 2015 [February 12, 2015].
- ^ HSA-Runtime-Reference-Source/README.md at master. github.com. November 14, 2014 [February 12, 2015].
- ^ Alex Woodie. HSA Foundation Aims to Boost Java’s GPU Prowess. HPCwire. 26 August 2013.
- ^ Bolt on github.
外部链接
[编辑]- YouTube上的HSA Heterogeneous System Architecture Overview by Vinod Tipparaju at SC13 in November 2013
- HSA and the software ecosystem
- 2012 – HSA by Michael Houston