spacer
Home | Careers | Contact Us | Search | Blog
  • About Us
  • Technology
  • Products
  • Customers
  • News & Events
  • Connected Blog

Arteris Connected Blog

Putting the “Heterogeneous” in the HSA Foundation

Posted by Kurt Shuler on Mon, Dec 10, 2012 @ 06:00 AM

  • Tweet

In September’s article, SMP, Asymmetric Multiprocessing, and the HSA Foundation, I explained why symmetric multiprocessing (SMP) architectures have been popular in PC and server markets, and why heterogeneous or asymmetric multiprocessing (AMP) has bspacer een the norm in mobility and consumer electronics markets. I also explained the trends that are leading PC and server markets to adopt heterogeneous architectures and introduced the HSA Foundation’s goal of making heterogeneous core chips easy to program.

In this month’s article I will introduce the HSA Solution Stack and give a longer-term vision of how HSA can scale beyond CPU-GPU computing. (Hint: The hardware/SoC interconnect fabric is a critical ingredient in this!)

How heterogeneous programming is done today

In its initial stages, HSA addresses the need for easy software programming of GPUs to take advantage of their unique capability to crunch parallel workloads much more efficiently than x86 or ARM CPUs. The graphic above summarizes this concept.

Today, CPUs and GPUs do not share a common view of system memory, requiring an application to explicitly copy data between the two devices. In addition, an application running on the CPU that wants to add work to the GPU’s queue must execute system calls that communicate through the CPU OS’s device driver stack, and then communicate with a separate scheduler that manages the GPU’s work.  This adds significant runtime latency, in addition to being very difficult to program.

HSAIL: Heterogeneous programming the HSA way

To avoid this situation and enable easier programming, HSA will allow developers to program at a higher abstraction level using mainstream programming languages, with the addition of libraries targeting HSA. The following is a high-level view of the HSA Solution Stack:

spacer The key to enabling one language for heterogeneous core programming is to have an intermediate runtime layer that abstracts hardware specifics away from the developer, leaving the hardware-specific coding to be done once by the hardware vendor or IP provider. In HSA, the top of this intermediate layer is the HSA Intermediate Language or “HSAIL”.


The diagram below shows the HSAIL and its path through the HSA runtime stack:

spacer HSAIL is created by compiling a high-level language like C++ with the HSA compilation stack. HSA’s compilation stack is based on the LLVM infrastructure (www.llvm.org), which is also used in OpenCL (www.khronos.org/opencl/). 

Creation of HSAIL can occur prior to runtime or during runtime: The OpenCL Runtime includes the compiler stack and is called at runtime to execute a program that is already in data-parallel form. Alternatively, Microsoft’s C++ AMP (C++ Accelerated Massive Parallelism) uses the compiler stack during program compilation rather than execution. The C++ AMP compiler extracts data-parallel code sections and runs them through the HSA compiler stack, and passes non-parallel code through the normal compilation path.

The diagram below shows the HSA Compilation Stack, where programming code is compiled into HSAIL using the LLVM compilation infrastructure:

 spacer

The hardware-specific HSA Finalizer

A key role is played by the hardware-specific “finalizer” which converts HSAIL to the computing unit’s native instruction set. Hardware and IP vendors are responsible for creating finalizers that support their hardware. The finalizer is lightweight and can be run at compile time, installation time or run time depending on requirements.

The finalizer is the point at which the specifics of different heterogeneous computing units are addressed. Initial HSA implementations will most likely support GPU compute with finalizers from GPU vendor HSA members like AMD, Imagination and ARM. (And maybe even Qualcomm to support their Adreno graphics cores.)

Heterogeneous: More than CPU and GPU

However, as discussed in last month’s article, many existing heterogeneous architectures have additional discrete processing units for functions like audio (digital signal processing or stream processing), image and video processing (SIMD frame processing), and security. As HSA matures, hardware and IP vendors creating these processing units may want to enable HSA programmability on their hardware by creating hardware-specific finalizers.

From dumb scheduling to smart scheduling

Having multiple heterogeneous processing units will complicate workload scheduling from a system perspective. The harsh reality is that existing workload scheduling and OS scheduling algorithms are relatively simple and generally only take into account local activity on a processing unit or cluster of homogeneous processing units (see the Linux Completely Fair Scheduler for one example of how scheduling is implemented: en.wikipedia.org/wiki/Completely_Fair_Scheduler).

These algorithms do not take into account the existing traffic coursing throughout the system or a view into other processing units. This lack of a global view for scheduling virtually guarantees there will be contention and stalling as processing units wait for access to precious system resources, especially the DRAM.

One way to enhance workload scheduling will be to probe existing runtime data flows at critical points throughout a system’s SoC interconnect fabric, and use this information to assign priorities to workloads, and workloads to processing units. As heterogeneous processing becomes the norm and more processing units are added to a system, this type of interconnect-assisted scheduling will be required.

In other words, the hardware interconnect is a key enabler to putting the heterogeneous into HSA.

Sources

Kyriazis, George (AMD). “Heterogeneous System Architecture: A Technical Review.” Whitepaper, HSA Foundation, August 2012.

HSA Solution Stack diagram is from developer.amd.com/Resources/hc/heterogeneous-systems-architecture/Pages/default.aspx.

Tags: System-on-Chip, AMP, symmetric multiprocessing, HSA foundation, SMP, asymmetric multiprocessing

Subscribe via E-mail

Download our latest technical papers


spacer

Kurt Shuler bio

spacer Kurt Shuler is the VP of marketing at Arteris. 

He has held senior roles at Intel, Texas Instruments, ARC International and two startups, Virtio and Tenison. Before working in high technology, Kurt flew as an air commando in the U.S. Air Force Special Operations Forces.

Kurt earned a B.S. in Aeronautical Engineering from the U.S. Air Force Academy and an MBA from the MIT Sloan School of Management.

Latest Posts

  • Moore's Law is Dead: Long Live SoC Designers
  • The Top 35 ISO 26262 acronyms and abbreviations
  • A Primer On ISO 26262 Certification
  • ‘Hardening’ SoCs For Automotive Market Challenges
  • Arteris is hiring: 4 job openings for HW engineers & SW developers!
  • What Does It Cost You When Your SoC is Late to Market?
  • The Critical Cost of Routing Congestion
  • Arteris is hiring engineers!
  • Arteris Emerges Strong in 2014 As Semiconductor Markets Diversify
  • SemiEngineering: The Uncertain Future Of Fabless Semis

Posts by category

  • 3D IC (1)
  • academia (1)
  • acquisitions (1)
  • AHB (2)
  • AMBA (3)
  • AMP (3)
  • analog (1)
  • Apple (1)
  • ARC (1)
  • ARM (2)
  • ARM NIC-400 (1)
  • Arteris FlexNoC (2)
  • arteris jobs (1)
  • ASB (1)
  • ASIC design (1)
  • ASICs (1)
  • asymmetric multiprocessing (2)
  • automotive semiconductors (1)
  • awards (2)
  • AXI (4)
  • benefits (1)
  • BlackBerry PlayBook (1)
  • bus (1)
  • C2C (5)
  • Cadence (1)
  • chinese supercomputer (1)
  • chip (1)
  • Chip to Chip (1)
  • consumer electronics (1)
  • cores (1)
  • Cost (1)
  • costs (1)
  • crossbar (1)
  • DAC (1)
  • design (1)
  • DTV (1)
  • dynamic power (1)
  • economics (6)
  • EDAC (1)
  • fabless semi (1)
  • fabric IP (1)
  • field programmable gate arrays (1)
  • FPGA (1)
  • FPGA design (1)
  • FPGAs (1)
  • free IP (1)
  • functional safety (2)
  • funding (1)
  • Gartner (2)
  • hardware design (1)
  • hardware jobs (1)
  • hardware verification (1)
  • history (1)
  • HSA foundation (2)
  • idle power (1)
  • Imagination (1)
  • industry (2)
  • intellectual property (3)
  • interchip connectivity (4)
  • Interconnect (3)
  • interconnect fabric (4)
  • interconnect IP (6)
  • IP (4)
  • IP integration (1)
  • IP protocols (3)
  • IP subsystems (1)
  • ISO 26262 (2)
  • jobs (2)
  • Late (1)
  • laurent moll (1)
  • lithography cost (1)
  • LLI (4)
  • M&A (1)
  • M-PHY (1)
  • Market (1)
  • MIPI HSI (2)
  • MIPI LLI (5)
  • MIPI UniPro (2)
  • MIPS (1)
  • moore's law (1)
  • network-on-chip (10)
  • Networks-On-Chip (2)
  • NoC (9)
  • NoC composition (1)
  • OCP (3)
  • OEM (2)
  • OMAP (2)
  • OMAP L3 (1)
  • OMAP TRM (3)
  • OMAP4430 TRM (1)
  • OMAP4460 TRM (1)
  • OMAP4470 TRM (1)
  • on-chip interconnect (2)
  • OS (1)
  • PlayBook tablet (1)
  • power (1)
  • power dissipation (1)
  • protocol (1)
  • research (3)
  • revenue loss (1)
  • routing congestion (2)
  • Semico (1)
  • semiconductor (1)
  • semiconductor industry (12)
  • semiconductor industry economics (4)
  • semiconductor IP (4)
  • semiconductor product development (1)
  • SMP (2)
  • SoC (7)
  • SoC design (3)
  • SoC economics (6)
  • SoC QoS (1)
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.