Get Started with Intel® oneAPI Deep Neural Network Library

ID 767262
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Get Started with Intel® oneAPI Deep Neural Network Library

The Intel® oneAPI Deep Neural Network Library (oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs.

The oneDNN library provides a SYCL* extensions API for CPUs and GPUs.

See also:
The full library documentation is available on GitHub and the Intel Developer Zone.

Before You Begin

Examples

Use the following sample projects to become familiar with the Intel® oneAPI Deep Neural Network Library:

Sample Name Description
getting_started

This C++ API example demonstrates the basics of the oneDNN programming model.

sycl_interop_buffer and sycl_interop_usm

This C++ API example demonstrates programming for Intel® Processor Graphics with SYCL extensions API in oneDNN.

Building Examples with the Intel® oneAPI DPC++/C++ Compiler

To setup the oneAPI environment, see the following examples.

Linux

source ${ONEAPI_ROOT}/setvars.sh

# Copy examples to a working directory
cp -R ${DNNLROOT}/examples .
cd examples

# Compile
icpx -fsycl getting_started.cpp -o getting_started -ldnnl

# Run
./getting_started cpu
./getting_started gpu

Windows

%ONEAPI_ROOT%\setvars.bat

# Copy examples to a working directory
xcopy /E "%DNNLROOT%\examples" examples
cd examples

# Compile
icx /EHa -fsycl getting_started.cpp dnnl.lib

# Run
getting_started.exe cpu
getting_started.exe gpu
NOTE:
You may also compile and link with the pkg-config tool.

Notices and Disclaimers

Intel technologies may require enabled hardware, software or service activation.

No product or component can be absolutely secure.

Your costs and results may vary.

© 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.