Posts

Add Post

« Return to Posts

“All right, I have not been the first, but at least I understand it.” - oneAPI : The Key Essentials

“All right, I have not been the first, but at least I understand it.” - oneAPI : The Key Essentials

All right, I have not been the first, but at least I understand it - Richard P. Feynman

1.0 Introduction

Intel oneAPI is divided into two parts — The Industry Initiative and The Intel® oneAPI Beta Product. The former is a cross-architecture development model based on standard groups and industry/academia initiatives as well as open specifications. The latter on the other hand, is a set of tools that includes support for direct programming and API-based programming by delivering a simplified and unified language, libraries as well as advanced analysis and debugging tools that offer full native code performance.

These tools are delivered in a packaged environment, called Toolkits. The Intel oneAPI Toolkits are for performance-driven applications in HPC, IoT, advanced rendering, deep learning frameworks that are written in DPC, C, C and Fortran languages and are available as —

  1. Intel® oneAPI Base Toolkit;

  2. Intel® oneAPI HPC Toolkit;

  3. Intel® oneAPI AI Analytics Toolkit;

  4. Intel® oneAPI Rendering Toolkit;

  5. Intel® oneAPI IoT Toolkit;

  6. Intel® System Bring-up Toolkit;

  7. Intel® Distribution of OpenVINO toolkit Powered by oneAPI).

The oneAPI Toolkits can be accessed remotely via Intel® DevCloud or locally by downloading the oneAPI Base Toolkit and domain-specific Toolkits from Intel oneAPI. For downloads and use, the oneAPI toolkit products are available in two support versions—

  1. Community supported version: In this version, the oneAPI Toolkits are available at no cost and are free to all and does not require a license to download and use it. Support is available via the oneAPI user community forum and includes access to the latest release of oneAPI Toolkits. (Download the Toolkits here).

  2. Commercially supported version (Intel® oneAPI Toolkit Products with Priority Support): In this version, it is necessary to purchase a supported Product license. Support is available via Intel engineers and includes access to both current and prior releases of oneAPI Toolkits. Finally, for the purchase of a supported product license, more information can be obtained from the authorized resellers by visiting this link.

1.1. Intel® DevCloud for oneAPI

Intel DevCloud is a scheme that is part of the self-service development solution provided by Intel; it is a remote development environment for developing, testing and optimizing applications; thus it saves programmers from local configuration headaches.

The DevCloud is intended for training and inference developers, HPC developers and Data scientists who wish to:

  1. Explore and learn the oneAPI unified programming model and associated toolkits;
  2. Develop, test and run data-centric workloads.

Emphasis must be laid on the fact that the DevCloud is not built for compute-intensive applications or for running high-end HPC applications, it is just an environment for testing and exploring toolkits provided by intel.

Furthermore, access to the DevCloud is free for 120 days (with the possibility of an extension). Finally, in the DevCloud environment, unlimited access time to a cluster of latest intel® hardware and software integrated with Intel® optimized frameworks, tools and libraries is provided.

1.2. Key things to note about Intel® oneAPI

The following are key pointers to help us remember what Intel oneAPI stands for:

  1. Across Diverse Industries (cross-industry): oneAPI provides one space for standard groups and industry/academia initiatives — ISO C++/Fortran groups, OpenMP* ARB, MPI Forum, The Khronos group. This collaboration fosters the possibility of composability and interoperability.

  2. Open Specifications: oneAPI provides support for product specific oneAPI implementations across multiple architectures — Industries can build their own implementation(s) of oneAPI to support their products or create new products based on oneAPI. For example, Codeplay’s implementation of a part of oneAPI programming model, DPC++, to support NVIDIA’s GPUs (see here).

  3. Across Diverse Accelerator Architectures (cross-architecture): oneAPI is a unified programming model / framework that provides support for workloads requiring different architectures — Scalar, Vector, Matrix and Spatial architectures deployed in CPUs, GPUs, AIs and FPGAs respectively (These architectures are often referred to as SVMS at Intel). oneAPI allows for homogeneous and heterogeneous programming (see an example of homogeneous and heterogeneous tridiagonal solver implemented with oneapi here).

oneAPI Cross  Architecture Model

  1. Unified Programming Framework: oneAPI empowers developers with a development environment which eliminates the need for different programming environments (- separate code bases, multiple vendor-specific libraries, tools and programming languages) across diverse architectures. This elimination, helps preserve time-saving approaches like code reuse. Code reuse is simply the practice of adapting a code to a different application or software or function or architecture (This is a great article on code reuse here).

The development environment of oneAPI contains provision of:

• Direct programming with DPC, OpenMP C/C, OpenMP Fortran.

• API-Based programming with domain-specific libraries.

• Analysis tools — debuggers, profilers, advisors.

• Porting tools.

• Level Zero Interface — a low-level direct-metal interface for offload accelerator devices. It provides support for device-specific programming interface and can be implemented to support a broader set of languages features such as function pointers, virtual functions, unified memory, and Input / Output capabilities.

oneAPI Programming Model

  1. Data Parallel C, DPC: DPC++ is an open-sourced data parallel language developed by Intel oneAPI; it supports data parallelism
    and heterogeneous programming (read more about DPC++ in section 1.3.).

  2. For Heterogeneous Computing Systems: oneAPI enables development of applications that can take advantage of systems that contain diverse types of computational units- CPUs, GPUs, FPGAs, ASICs, and others. For example, the tridiagonal solver mentioned in 3. above, shows the advantage of the CPU-GPU implementations for larger data sizes.

  3. High Performance: oneAPI enables the development of applications across diverse architectures designed to-
    a. Achieve high speeds;
    b. Maximize memory usage;
    c. Maximize power / energy.

  4. Data-Centric: Intel is centered around delivering high performance data-centric initiatives (technologies) needed by industries to develop solutions to support their products — oneAPI is one of such initiatives. A data-centric strategy enables the development of solutions that can move, store and process data faster into valuable information.

With oneAPI, we have available a toolbox of compilers, libraries, debuggers and analysis tools that help us develop efficient programs (programs that maximize resources available on an architecture); all we have to do, is to determine a problem type, target (a) specific architecture(s), reach into the toolbox for applicable tools and develop an efficient solution for solving the problem. Of course, developing an efficient solution will mean that we have to equip our minds and study resources with optimization techniques, programming patterns, architecture information, and any other useful information.

1.3. What is Data Parallel CPP, DPCPP ?

(I have used PP here to denote the plus symbol, because somehow, the preview is omitting the signs in some sections, sorry for the inconsistency ).

DPCPP is Intel’s adaption of SYCL- an industry-driven standard that adds data parallelism to C++ for heterogeneous systems.

Learning DPC is simply learning ”data-parallel programming with C, SYCL and some new extensions such as Unified Shared Memory, use of sub-groups e.t.c, for CPUs, GPUs, FPGAs and other accelerators” (download the free ebook for mastering DPC++ here).

If you are already familiar with different programming models (OpenMP, MPI, CUDA, OpenCL, e.t.c) for different architectures, well done! It gets even more interesting with oneAPI, because of its support for cross-industry standards. Intel oneAPI provides the necessary tools to migrate from existing programs written in C/C, CUDA*, OpenCL to SYCL/DPC (see here).It also makes available the possibility of composing DPC with C/C OpenMP* and it allows for OpenCL interoperability — in this case an OpenCL developer can continue to
work with OpenCL but on the SYCL API (see here).

However, if you are not familiar with different programming models for different architectures, welcome to DPC++! It is a good place
to start your heterogeneous application development.

Acronyms

  1. AI — Artificial Intelligence

  2. CPU — Central Processing Unit

  3. CUDA* — Compute Unified Device Architecture

  4. DevCloud — Intel oneAPI Development Cloud

  5. DPC — Data Parallel C

  6. Fortran — Formula Translator, Formula Translation, Formula Translating System, Formulaic Translation

  7. FPGA — Field-Programmable Gate Array

  8. GPU — Graphics Processing Unit

  9. HPC — High Performance Computing

  10. IoT — Internet of Things

  11. ISO — International Organization for Standardization

  12. MPI — Message Passing Interface

  13. OpenCL — Open Computing Language

  14. OpenMP* — Open Multiprocessing

  15. XPU — Other Processing Units (for example AI-ASICs (Artificial Intelligence-Application Specific Integrated Circuits)

References

  1. Intel Newsroom, “Fact sheet: oneapi,” Intel Corporation, November, 17 2019. [Online]. Available: here.

  2. J. Reinders, B. Ashbaugh, J. Brodman, M. Kinsner, J. Pennycook, and X. Tian, Data Parallel C — Mastering DPC for Programming of Heterogeneous Systems using C++ and SYCL. Apress, Berkeley, CA, 2021. [Online]. Available: here.

  3. News Byte, “Intel’s ’one api’ project delivers unified programming model across diverse architectures,” Intel Corporation, June, 19 2019. [Online]. Available: here.

  4. M. Chaturvedi, “A beginner’s guide to intel oneapi,” In Opinions, Analytics India Magazine Pvt. Ltd., June, 2 2021. [Online]. Available: here.

  5. Press Kit, “Data-centric innovation,” Intel Corporation, April, 5 2019. [Online]. Available: here.

  6. Intel, “Diverse architectures for unmatched innovation unprecedented choice in architecture to solve for any compute need.” Intel Corporation, — -. [Online]. Available: here.

Thank you for reading!

Oluwatosin Odubanjo.