User:MofuMoca/異構系統架構
![](http://178.128.105.246/cars-http-upload.wikimedia.org/wikipedia/commons/thumb/d/de/HSA_%E2%80%93_using_the_GPU_without_HSA_%28Traditional_Chinese%29.svg/400px-HSA_%E2%80%93_using_the_GPU_without_HSA_%28Traditional_Chinese%29.svg.png)
![](http://178.128.105.246/cars-http-upload.wikimedia.org/wikipedia/commons/thumb/3/3c/HSA_%E2%80%93_using_the_GPU_with_HSA_%28Traditional_Chinese%29.svg/400px-HSA_%E2%80%93_using_the_GPU_with_HSA_%28Traditional_Chinese%29.svg.png)
異構系統架構(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]
軟體支援
[编辑]![](http://178.128.105.246/cars-http-upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Linux_AMD_graphics_stack.svg/400px-Linux_AMD_graphics_stack.svg.png)
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.
參見
[编辑]![](http://178.128.105.246/cars-http-upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png)
參考資料
[编辑]- ^ 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