Heterogeneous Computing Programming: oneAPI and Data Parallel C++

Print Friendly, PDF & Email

Sponsored Post

What you missed at the Intel Developer Conference, and how to catch-up today

By James Reinders

In the interests of full disclosure … I must admit that I became sold on DPC++ after Intel approached me (as a consultant – 3 years retired from Intel) asking if I’d help with a book on DPC++. I was skeptical at first, but the more I learned, the more I wanted to help. Many months later, with the opening day of Intel’s HPC Developers conference (ahead of SuperComputing 2019 in Denver), I sat in the audience with everyone else anxious to see Intel make oneAPI and DPC++ public. I was also invited to meet some customers, and Intel engineers, afterwards to provide feedback.

I’d like to share why I see so much potential in what Intel is announcing — and most importantly: how you can try it out yourself and decide for yourself. By the way, the book I mentioned is a work in progress and you can download the first four chapters of Data Parallel C++.  I’d love to hear your feedback!

Imagine a world where multiarchitecture programming is a given – and software developer tools are always multiarchitecture: compilers, debuggers, libraries, and optimization tools. That can become a reality with Intel’s unveiling of the oneAPI open industry initiative, including a cloud platform to test them on.

Intel offers strong evidence of its commitment to this era of heterogeneous computing, by aligning its hardware and software roadmaps to strongly support this world order—where multiarchitecture programming is the norm. In addition to its continuing delivery of new capabilities on Intel® Xeon® Scalable processors and powerful Intel Stratix® FPGAs, Intel disclosed more about the new Intel Xe architecture for HPC.

This is definitely good news. Read on to learn how you can check it out yourself.

Background: oneAPI and DPC++

The oneAPI project creates a specification for supporting programmers of heterogeneous systems, in a way that is open and aims to make the most out of every compute device within a system — no unequal treatment (Raja said “no transistor left behind” and “no programmer left behind”).  The project outlines support for both direct programming and API programming. Intel promises to deliver product (in beta now) that delivers a unified language and libraries with the ability to yield full native code performance across a range of hardware, including CPUs, GPUs, FPGAs and AI accelerators.

The oneAPI project is a game changer for software developers — in that it declares that the norm for programming should be a unified programming model that simplifies development for workloads across diverse architectures. Gone should be the days of proprietary solutions specific to one vendor’s hardware. Gone should be the days when a library, or a tool, can limit its visibility and usefulness to a single type of compute device.

What may be truly different about Intel in its approach to heterogeneous computing is that it seeks to be both open and performant — which would set it apart from other approaches available today.

Imagine a world where libraries and languages are expected to support a range of hardware — a world where the programmer can program a range of hardware using a unified language and a single code base — but still have access to full native code performance!

The vision does not stop at Intel hardware either — it is open, including both the oneAPI specification, and the Khronos Group’s SYCL specifications upon which DPC++ is built. The openness means that anyone can build their own implementations of oneAPI to support their solutions and products. The specifications for oneAPI are labelled pre-1.0 (and they look that way – so feedback looks likely to be useful for the spec), with Intel encouraging community feedback.

Data Parallel C++ Builds on C++ the Right Way

At the heart of the specifications, tools, toolkits, and libraries is the Data Parallel C++ compiler. Data Parallel C++ will feel very familiar to any C++ programmer, and has all the productivity and performance you would expect with C++. Data Parallel C++ is full C++, extended for data parallelism by the Khronos SYCL specifications, with some Intel extensions that aim to provide functionality not yet in C++ or SYCL.

Data Parallel C++ is a kernel-based approach to programming, so it will feel familiar to those who know CUDA, OpenCL, or SYCL.  DPC++ is a compliant SYCL compiler, with extensions. Like SYCL and OpenCL, DPC++ is not a proprietary solution. 

Intel’s implementation of oneAPI is designed to ensure a seamless journey for developers as they migrate current applications or build new ones to take advantage of different architectures. It is compatible and interoperable with other standards including Fortran, OpenMP and MPI, so developers don’t lose their existing coding investments.

Build DPC++ Completely from Open Source

Get the DPC++ compiler prebuilt with installers or build the DPC++ compiler completely from source, it is your choice.

You’ll want the oneAPI tools and toolkits from Intel which is also the easy way to get the DPC++ compiler as well. It is also very easy to build from the open source repository (I’ve done it successfully on several Linux and Windows systems by following the instructions at GetStartedWithSYCLCompiler.md). All the examples in the training videos, and in the DPC++ book, will compile and work with either the Intel product DPC++ compiler, or the open source compiler built from the GitHub repo — on Linux and Windows.

How to Try it Out: oneAPI Beta is Free, and Easy to Try

On Intel’s oneAPI product website for software developers you will find more information on the toolkits and their component tools. The oneAPI site for the specifications, and the oneAPI community is http://oneapi.com.

This is a 1-2-3 to learn more (all of this is free – no hidden costs):

  • Download the preprint/preview of Chapters 1-4 of the upcoming DPC++ Book
  • Sign-up for DevCloud, or download and install the tools on your own machine(s). DevCloud offers immediate access to all types of intel hardware where you can test workloads and code without spending any time on installation and configuration.
  • Watch training videos to get tips how to use DevCloud, build from open source, and learn DPC++

Join in the oneAPI Community, and Leap into the Heterogeneous Future

The contributions by Intel in creating oneAPI, and promoting heterogeneous programming, puts us all at least a “step” closer to the future, if not a “leap” into the future.

The goals for oneAPI really are set apart from other efforts we have seen promoted in the past – it really is about enable all devices, not just a GPU, or an FPGA, or an AI chip. It’s about supporting them all.

Heterogeneous programming is here to stay, and oneAPI offers a path to make it easier for us all.

Refer to https://software.intel.com/en-us/articles/optimization-notice for more information regarding performance and optimization choices in Intel software products.

© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.

Speak Your Mind

*