Visible to Intel only — GUID: GUID-04E18F68-BA45-418B-86C0-422089AD6AF8
Visible to Intel only — GUID: GUID-04E18F68-BA45-418B-86C0-422089AD6AF8
Parallelization
Parallelism is essential to effective use of accelerators because they contain many independent processing elements that are capable of executing code in parallel. There are three ways to develop parallel code.
Programming Language and APIs
There are many parallel programming languages and APIs that can be used to express parallelism. oneAPI is an open industry standard for heterogeneous computing. It supports parallel program development through the SYCL* framework. The Intel® oneAPI products have a number of code generation tools to convert source programs into binaries that can be executed on different accelerators. The usual workflow is that a user starts with a serial program, identifies the parts of the code that take a long time to execute (referred to as hotspots), and converts them into parallel kernels that can be offloaded to an accelerator for execution.
Compilers
Directive-based approaches like OpenMP* are another way to develop parallel programs. In a directive-based approach, the programmer provides hints to the compiler about parallelism without modifying the code explicitly. This approach is easier than developing a parallel program from first principles.
Libraries
A number of libraries like oneTBB, oneMKL, Intel® oneAPI Deep Neural Network Library (oneDNN), and Intel® Video Processing Library (Intel® VPL) provide highly-optimized versions of common computational operations run across a variety of accelerator architectures. Depending on the needs of the application, a user can directly call the functions from these libraries and get efficient implementations of these for the underlying architecture. This is the easiest approach to developing parallel programs, provided the library contains the required functions. For example, machine learning applications can take advantage of the optimized primitives in oneDNN. These libraries have been thoroughly tested for both correctness and performance, which makes programs more reliable when using them.