Compilers and More: Knights Ferry Versus Fermi

By Michael Wolfe

August 5, 2010

In my last column, I reviewed the architecture of the Intel Larrabee processor, comparing it to a quad-core Nehalem, and considering possible follow-on designs. Larrabee was initially designed as a discrete graphics engine that would also address highly-parallel applications while preserving x86 programmability. It was demonstrated with much fanfare at Justin Rattner’s SC09 opening keynote talk. However, within a month, Intel announced that Larrabee products would be deferred, though it seems the architecture was not entirely cancelled. In May, Intel announced the Many Integrated Core (MIC, pronounced “Mike”) architecture, with a development kit codenamed Knights Ferry. The Knights Ferry chip was described broadly by Kirk Skaugen at his ISC’10 keynote talk in Hamburg, Germany. Slide 33 from his presentation makes the Knights Ferry design look remarkably like the graphic in the 2008 SIGGRAPH article describing Larrabee. The Knights Corner, the first real product based on the MIC architecture, will use Intel’s 22nm process and include more than 50 x86 cores. Perhaps Intel will insert other architectural changes along the way.

In the meantime, NVIDIA has announced and started to deliver its next-generation architecture, Fermi. In that previous column, I had promised a comparison of the Larrabee architectural features to those of the NVIDIA Tesla and Fermi; however, when Intel pulled the plug on Larrabee, such a comparison seemed moot. With Larrabee’s resurrection and rebranding, perhaps it’s an appropriate topic again. So let’s start with a short architecture review of the Intel MIC and NVIDIA Fermi (aka Tesla-20 series).

Review: Intel MIC

The Knights Ferry has 32 x86 cores on chip, each with 32KB L1 instruction cache, 32KB L1 data cache, and 256KB L2 cache. I will refer to them as 32 processors. Each processor has a vector unit, essentially a very wide (512 bits or 16 floats) SSE unit, allowing 16 single precision floating point operations in a single instruction. Double-precision compute throughput is half that of single-precision. The 32 data caches are kept coherent by a ring network, which is also the connection to the on-chip memory interface(s). Each processor supports a multithreading depth of four, enough to keep the processor busy while filling an L1 cache miss. The Knights Ferry is implemented on a PCI card, and has its own memory, connected to the host memory through PCI DMA operations. This interface may change in future editions, but Intel advertises the MIC as “an Intel Co-Processor Architecture.” This could be taken as acknowledgement that accelerators can play a legitimate role in the high performance market.

PGI Larrabee Block Diagram

Review: NVIDIA Fermi

The new NVIDIA Fermi architecture has up to 512 CUDA cores, though the largest cards being delivered to date have 480 or 448. These are organized into 14 streaming multiprocessors, each with two sets of 16 thread processors. I will call this 14 dual processors, or 28 processors, each with 16 thread processors, allowing 16 single precision floating point operations in a single cycle in each processor. Double precision throughput is half that of single precision, like current CPUs. Each processor has a 64KB data cache, part of which is hardware managed, like the MIC, and part software managed. Exactly how much is hardware vs. software managed is selectable by the program. There is also 768KB shared L2 data cache. Each streaming multiprocessor supports a multithreading depth of 48, though that must keep two processors busy, so we’ll call this a depth of 24 for each processor.

PGI Fermi Block Diagram

Comparison: Parallelism

So now we can start to compare the designs. Here we’ll focus on Intel Knights Ferry and NVIDIA Fermi. Fermi is available now, and Knights Ferry is being provided to selected Intel customers for experimentation and evaluation. The MIMD parallelism level is about the same, 32 for the MIC and 28 for current Fermi chips. The SIMD parallelism is also the same, at 16. The multithreading context parallelism favors Fermi, 24 vs. 4. Keep in mind that the multithreading contexts don’t actually compute in parallel; multithreading only comes into play when one thread is stalled on memory or some other long latency operation. Intel is likely depending on its larger cache memory to satisfy most memory operations quickly, whereas NVIDIA uses a high multithreading degree instead. If Knights Ferry is similar to Larrabee, it has a dual-issue control unit, for two-wide instruction-level parallelism, something the current Fermi does not. Both use in-order instruction issue, simplifying the control unit, leaving more silicon real estate for functional units, registers, memory, and so on. This puts more emphasis on the compiler, since instruction count again becomes an important metric for performance.

Comparison: Parallelism Model

Both architectures support a shared-memory programming model, though they are quite different in the details. The MIC supports a more classical coherent shared-memory parallel programming paradigm. All memory accesses through the cache are kept coherent through the fast interprocessor ring network. Dynamic parallelism, where parallel threads spawn new parallel threads, is fully supported.

The NVIDIA GPUs require very structured parallelism. The program must be divided into kernels, where each kernel executes on a multidimensional rectangular domain. The domain has MIMD dimensions and SIMD dimensions. The parallel MIMD dimension, which is spread across the processors, can only synchronize at the implicit barrier between kernels. If two threads on different processors try to communicate through the shared memory, no result is guaranteed.

Comparison: Memory Organization

Let’s look at the memory organization. The Intel MIC uses a classical two-level cache per core, whereas Fermi uses a combination of software-managed and hardware-managed data cache. The effectiveness of a software-managed data cache depends on the ability of the programmer or compiler to take advantage of it. The effectiveness of a hardware cache depends on the locality of data accesses. For many applications, hardware caches work quite well. For stream processing on large data sets, they are less useful. Fermi has a very high bandwidth path (140GB/sec) to the main memory. It’s unlikely that the current Intel MIC can compete on raw bandwidth. The above-mentioned 2008 SIGGRAPH article about Larrabee describes some of the algorithmic details used to make effective use of the caches.

Both cards have a separate memory from the host and function as attached processors. For NVIDIA, the program allocates memory in the device memory, copies data from the host to device across the PCI bus, launches kernels on the device, and copies results back to the host. There is no virtual memory support on the GPU, and addresses on the host and the device are distinct. This means the program must manage host and GPU addresses separately.

Assuming the Intel MIC is similar to Larrabee, the same sequence of operations must take place. However, the x86 cores support full virtual memory translation, and the cores run a reasonably complete microkernel operating system. The support software allows a shared address space across the host and the accelerator. Note: this is easily confused with shared memory, which it is not. When the accelerator gets a page fault for data shared with the host, the operating system will move the page from the host to the device memory, marking it read-only or unavailable on the host side. Similarly, if the host gets a page fault on a shared page, the operating system will move the page back. In both cases, the data is being moved across the relatively slow PCI bus, but since it occurs without programmer intervention, it simulates shared memory. The real advantage of this approach isn’t that the data gets automatically moved, but that the same address can be used on the MIC as on the host. For high performance, the programmer should insert API calls to tell the support software when to move what data to which memory, so as to amortize the data movement latency. This is essentially the same work the NVIDIA programmer has to do, except the same address pointer can be used on both sides.

Comparison: Support for Parallelism

There are four issues with parallelism support: What is a thread? How are the parallel threads created? How are the threads scheduled across the processors, and is there support for user control (tuning)? How do the threads synchronize?

Fermi is designed to run parallel algorithms, and includes built-in support for parallelism control and synchronization. When you launch a parallel kernel, the program gives the shape of the rectangular domain and the address of the kernel code. The NVIDIA hardware creates and distributes the parallel instances of the kernel across the processors, initiating new instances as they complete or to take advantage of multithreading parallelism. The threads are fine-grained and short-lived; new threads are created as fast as old ones complete. In addition, there is hardware support for fast barrier synchronization among SIMD threads in the same thread group (and on the same processor). So thread creation and scheduling is fast, but there is no real support for tuning, and synchronization is very fast, but limited.

The MIC uses classical software thread creation, scheduling and synchronization. As with common multiprocessor and multicore implementations, threads are coarse grain and have a long lifetime. Thread creation is relatively inexpensive, but it’s likely that parking and recycling threads will be much more efficient than recreating threads each time they are needed. Scheduling is done by the operating system, but a lightweight task scheduling API, such as was provided for Larrabee, will allow user tuning. Synchronization is done in software using memory semaphores, depending on the hardware cache coherence ring. Here, Intel trades performance for flexibility and standardization.

Comparison: Programming Tools

Fermi is programmed through several specialty languages. OpenGL and DirectX are used for graphics, but most compute programming is done using the extended C CUDA language. Reprogramming for the NVIDIA requires a substantial effort in extracting the computational kernels, inserting device memory management, and adding the control code in the host program. For many applications, the performance payoff is worth the effort. There are several other products (including one from PGI) and development efforts using directives or language primitives to ease the coding effort, and the OpenCL standardization effort as well.

The Intel MIC will be programmed using native C/C++ compilers from Intel, and presumably from other sources as well. If the program is already parallelized with threads and the compiler vectorizes the code successfully, then the program may be ported with nothing more than a recompile (or so we can dream, anyway). In any case, the amount of restructuring to get started is likely to be quite a bit less intrusive than for NVIDIA. Getting high performance requires exploiting the two levels of parallelism (multicore and wide SSE), optimizing for memory strides and locality, and minimizing data communication between the host and MIC coprocessor, exactly the same problems you have coding for a GPU with CUDA or OpenCL.

Comparison: Technology

NVIDIA has been delivering the Fermi for some months, using a 40nm TSMC process with a 1.1GHz clock. We can expect NVIDIA to have a new spin of their product in the 2011 time frame, ready to compete with the Knights Ferry, by which time TSMC is reported to be delivering its 28nm process in bulk.

The Intel Knights Ferry MIC is being initially introduced in a 32-core version using a 45nm process, reportedly with a 1.2GHz clock. Intel is already delivering CPU chips with its 32nm process. The Knights Corner product will use Intel’s upcoming 22nm process, with more than 50 cores. It’s hard to compete with Intel’s technology. Few companies have the capital to experiment and develop new technology, and build the new chip fabrication plants to use it. Intel is perhaps foremost among them.

Intel can afford to stay ahead of the competition in silicon technology. NVIDIA and other competitors have to make up the difference with architecture.

Summary

My scorecard on the Intel MIC vs. NVIDIA Fermi battle shows them addressing the same problems (highly parallel applications) with some of the same features (many processors with wide SIMD operations), but with significant differences. Intel lives and breathes with x86 compatibility, and this is a new avenue for the x86 instruction set. NVIDIA has the luxury of more flexibility with instruction set and design parameters.

   Intel MIC  NVIDIA Fermi
 MIMD Parallelism 32 32(28)
 SIMD Parallelism 16 16
 Instruction-Level Parallelism 2 1
 Thread Granularity coarse   fine
 Multithreading 4 24
 Clock 1.2GHz 1.1GHz
 L1 cache/processor 32KB 64KB
 L2 cache/processor 256KB 24KB
 programming model posix threads CUDA kernels
 virtual memory yes no
 memory shared with host no no
 hardware parallelism support no yes
 mature tools yes yes

It will be even more interesting to see this comparison in 18-24 months, when the Intel Knights Corner is available, and NVIDIA has had time for another successor. Will Intel opt to put the Knights Corner in a QuickPath Interconnect slot? Will the memory bandwidth requirements of a manycore chip require a separate memory interface? At the same time, AMD is promising to deliver its Fusion chip, with a CPU and GPU on the same die. Will it intermix host virtual memory with high bandwidth GPU memory?

Accelerators in HPC

It’s clear that compute accelerators will play a role in high performance computing. All the vendors have gone or are going down that route. The questions are which applications will be able to make effective use of accelerators, which accelerator architectures will survive and thrive, and, most interesting to me, how will we program them? A programming model that allows or even promotes both functional and performance portability across a range of accelerators is in order now.

There are at least four general approaches to parallel programming, all of which apply to accelerators.

  • You can use optimized libraries. This is the basis of the BLAS and LAPACK libraries, among many (many) others. You program with calls to the library, and depend on the vendor or other provider to optimize the library for your machine. There are already several versions of linear algebra routines for CUDA targets, for instance. The routines in the library essentially become the vocabulary of your language. Programs that can be expressed in this vocabulary can achieve high performance. The performance of your own code becomes unimportant, assuming most of the computation is done in the library routines. The downside is that the library calls are opaque, not only to the programmer, but to each other. A library can’t take advantage of a sequence of operations, such as a matrix transpose followed by a matrix product, that could be optimized together.
     
  • In an object-oriented language, you can use optimized class libraries. The advantage of a class library is the ability to use your own data types and operators in the scope of the class. It does require coding to the class, and the class author must provide source code to get the full benefit, which is usually not a problem in the open source science community. Optimized class libraries have the advantage that the compiler can use function inlining to generate better code. However, this is the only trick that compilers have. A class library has no semantic advantage. There is nothing you can implement with a class library that you couldn’t have written in C, although it would take much, much more effort in C. Also, the class methods don’t compose well unless they can be inlined and optimized together.
     
  • There are new languages targeting parallel programming or accelerator programming. Here we have CUDA (C and Fortran) for NVIDIA GPUs, and OpenCL being proposed as a more general solution. OpenCL solves part of the problem, providing functional and programming skill portability. But OpenCL is intentionally very low level; programs tuned for architecture A may not perform so well on machines B, C or D.
     
  • Finally, we have compiler-based programming, using either automatic or semi-automatic (directive-based) analysis. There are several research and commercial efforts in this direction, and the OpenMP language committee has a subgroup working on standardizing a set of accelerator directives, based largely on proposals by PGI and Cray, to allow programming and tuning across a wide range of accelerators. One advantage of using compilers is they can give performance prediction feedback, something no library will do. The disadvantage is that compilers are large and complex pieces of software, and it’s challenging to mesh a new programming model seamlessly into an existing language.

A successful programming model will allow tuning for the critical performance features in a portable way. Common themes across the accelerator architectures we see today include managing data transfers between memory spaces (host and accelerator), exploiting two levels of parallelism (MIMD or multicore, and SIMD or vector), and optimizing memory strides and locality. CUDA and OpenCL allow for performance tuning, but portability is in question. The best overall solution will be a high level programming model that interoperates with highly-tuned low-level kernels, in the same way that we use high level languages today with highly tuned mathematics and statistics libraries, often written in assembly language.

About the Author

Michael Wolfe has developed compilers for over 30 years in both academia and industry, and is now a senior compiler engineer at The Portland Group, Inc. (www.pgroup.com), a wholly-owned subsidiary of STMicroelectronics, Inc. The opinions stated here are those of the author, and do not represent opinions of The Portland Group, Inc. or STMicroelectronics, Inc.

Subscribe to HPCwire's Weekly Update!

Be the most informed person in the room! Stay ahead of the tech trends with industy updates delivered to you every week!

PRACEdays Reflects Europe’s HPC Commitment

May 25, 2017

More than 250 attendees and participants came together for PRACEdays17 in Barcelona last week, part of the European HPC Summit Week 2017, held May 15-19 at t Read more…

By Tiffany Trader

Russian Researchers Claim First Quantum-Safe Blockchain

May 25, 2017

The Russian Quantum Center today announced it has overcome the threat of quantum cryptography by creating the first quantum-safe blockchain, securing cryptocurr Read more…

By Doug Black

Google Debuts TPU v2 and will Add to Google Cloud

May 25, 2017

Not long after stirring attention in the deep learning/AI community by revealing the details of its Tensor Processing Unit (TPU), Google last week announced the Read more…

By John Russell

Nvidia CEO Predicts AI ‘Cambrian Explosion’

May 25, 2017

The processing power and cloud access to developer tools used to train machine-learning models are making artificial intelligence ubiquitous across computing pl Read more…

By George Leopold

HPE Extreme Performance Solutions

Exploring the Three Models of Remote Visualization

The explosion of data and advancement of digital technologies are dramatically changing the way many companies do business. With the help of high performance computing (HPC) solutions and data analytics platforms, manufacturers are developing products faster, healthcare providers are improving patient care, and energy companies are improving planning, exploration, and production. Read more…

PGAS Use will Rise on New H/W Trends, Says Reinders

May 25, 2017

If you have not already tried using PGAS, it is time to consider adding PGAS to the programming techniques you know. Partitioned Global Array Space, commonly kn Read more…

By James Reinders

Exascale Escapes 2018 Budget Axe; Rest of Science Suffers

May 23, 2017

President Trump's proposed $4.1 trillion FY 2018 budget is good for U.S. exascale computing development, but grim for the rest of science and technology spend Read more…

By Tiffany Trader

Hedge Funds (with Supercomputing help) Rank First Among Investors

May 22, 2017

In case you didn’t know, The Quants Run Wall Street Now, or so says a headline in today’s Wall Street Journal. Quant-run hedge funds now control the largest Read more…

By John Russell

IBM, D-Wave Report Quantum Computing Advances

May 18, 2017

IBM said this week it has built and tested a pair of quantum computing processors, including a prototype of a commercial version. That progress follows an an Read more…

By George Leopold

PRACEdays Reflects Europe’s HPC Commitment

May 25, 2017

More than 250 attendees and participants came together for PRACEdays17 in Barcelona last week, part of the European HPC Summit Week 2017, held May 15-19 at t Read more…

By Tiffany Trader

PGAS Use will Rise on New H/W Trends, Says Reinders

May 25, 2017

If you have not already tried using PGAS, it is time to consider adding PGAS to the programming techniques you know. Partitioned Global Array Space, commonly kn Read more…

By James Reinders

Exascale Escapes 2018 Budget Axe; Rest of Science Suffers

May 23, 2017

President Trump's proposed $4.1 trillion FY 2018 budget is good for U.S. exascale computing development, but grim for the rest of science and technology spend Read more…

By Tiffany Trader

Cray Offers Supercomputing as a Service, Targets Biotechs First

May 16, 2017

Leading supercomputer vendor Cray and datacenter/cloud provider the Markley Group today announced plans to jointly deliver supercomputing as a service. The init Read more…

By John Russell

HPE’s Memory-centric The Machine Coming into View, Opens ARMs to 3rd-party Developers

May 16, 2017

Announced three years ago, HPE’s The Machine is said to be the largest R&D program in the venerable company’s history, one that could be progressing tow Read more…

By Doug Black

What’s Up with Hyperion as It Transitions From IDC?

May 15, 2017

If you’re wondering what’s happening with Hyperion Research – formerly the IDC HPC group – apparently you are not alone, says Steve Conway, now senior V Read more…

By John Russell

Nvidia’s Mammoth Volta GPU Aims High for AI, HPC

May 10, 2017

At Nvidia's GPU Technology Conference (GTC17) in San Jose, Calif., this morning, CEO Jensen Huang announced the company's much-anticipated Volta architecture a Read more…

By Tiffany Trader

HPE Launches Servers, Services, and Collaboration at GTC

May 10, 2017

Hewlett Packard Enterprise (HPE) today launched a new liquid cooled GPU-driven Apollo platform based on SGI ICE architecture, a new collaboration with NVIDIA, a Read more…

By John Russell

Quantum Bits: D-Wave and VW; Google Quantum Lab; IBM Expands Access

March 21, 2017

For a technology that’s usually characterized as far off and in a distant galaxy, quantum computing has been steadily picking up steam. Just how close real-wo Read more…

By John Russell

Trump Budget Targets NIH, DOE, and EPA; No Mention of NSF

March 16, 2017

President Trump’s proposed U.S. fiscal 2018 budget issued today sharply cuts science spending while bolstering military spending as he promised during the cam Read more…

By John Russell

Google Pulls Back the Covers on Its First Machine Learning Chip

April 6, 2017

This week Google released a report detailing the design and performance characteristics of the Tensor Processing Unit (TPU), its custom ASIC for the inference Read more…

By Tiffany Trader

HPC Compiler Company PathScale Seeks Life Raft

March 23, 2017

HPCwire has learned that HPC compiler company PathScale has fallen on difficult times and is asking the community for help or actively seeking a buyer for its a Read more…

By Tiffany Trader

CPU-based Visualization Positions for Exascale Supercomputing

March 16, 2017

Since our first formal product releases of OSPRay and OpenSWR libraries in 2016, CPU-based Software Defined Visualization (SDVis) has achieved wide-spread adopt Read more…

By Jim Jeffers, Principal Engineer and Engineering Leader, Intel

Nvidia Responds to Google TPU Benchmarking

April 10, 2017

Last week, Google reported that its custom ASIC Tensor Processing Unit (TPU) was 15-30x faster for inferencing workloads than Nvidia's K80 GPU (see our coverage Read more…

By Tiffany Trader

Nvidia’s Mammoth Volta GPU Aims High for AI, HPC

May 10, 2017

At Nvidia's GPU Technology Conference (GTC17) in San Jose, Calif., this morning, CEO Jensen Huang announced the company's much-anticipated Volta architecture a Read more…

By Tiffany Trader

TSUBAME3.0 Points to Future HPE Pascal-NVLink-OPA Server

February 17, 2017

Since our initial coverage of the TSUBAME3.0 supercomputer yesterday, more details have come to light on this innovative project. Of particular interest is a ne Read more…

By Tiffany Trader

Leading Solution Providers

Facebook Open Sources Caffe2; Nvidia, Intel Rush to Optimize

April 18, 2017

From its F8 developer conference in San Jose, Calif., today, Facebook announced Caffe2, a new open-source, cross-platform framework for deep learning. Caffe2 is Read more…

By Tiffany Trader

Tokyo Tech’s TSUBAME3.0 Will Be First HPE-SGI Super

February 16, 2017

In a press event Friday afternoon local time in Japan, Tokyo Institute of Technology (Tokyo Tech) announced its plans for the TSUBAME3.0 supercomputer, which w Read more…

By Tiffany Trader

Is Liquid Cooling Ready to Go Mainstream?

February 13, 2017

Lost in the frenzy of SC16 was a substantial rise in the number of vendors showing server oriented liquid cooling technologies. Three decades ago liquid cooling Read more…

By Steve Campbell

MIT Mathematician Spins Up 220,000-Core Google Compute Cluster

April 21, 2017

On Thursday, Google announced that MIT math professor and computational number theorist Andrew V. Sutherland had set a record for the largest Google Compute Eng Read more…

By Tiffany Trader

US Supercomputing Leaders Tackle the China Question

March 15, 2017

As China continues to prove its supercomputing mettle via the Top500 list and the forward march of its ambitious plans to stand up an exascale machine by 2020, Read more…

By Tiffany Trader

HPC Technique Propels Deep Learning at Scale

February 21, 2017

Researchers from Baidu's Silicon Valley AI Lab (SVAIL) have adapted a well-known HPC communication technique to boost the speed and scale of their neural networ Read more…

By Tiffany Trader

DOE Supercomputer Achieves Record 45-Qubit Quantum Simulation

April 13, 2017

In order to simulate larger and larger quantum systems and usher in an age of "quantum supremacy," researchers are stretching the limits of today's most advance Read more…

By Tiffany Trader

Knights Landing Processor with Omni-Path Makes Cloud Debut

April 18, 2017

HPC cloud specialist Rescale is partnering with Intel and HPC resource provider R Systems to offer first-ever cloud access to Xeon Phi "Knights Landing" process Read more…

By Tiffany Trader

  • arrow
  • Click Here for More Headlines
  • arrow
Share This