Get Started

  • 2021.1
  • 12/04/2020
  • Public Content

Configure Your System

Intel® oneAPI DL Framework Developer Toolkit
To run samples using the
Intel® oneAPI
DPC++/C++
Compiler
and Intel® Threading Building Blocks, you must install the
Intel® oneAPI Base Toolkit
before configuring your system.
For a complete list of system requirements, see the Intel® oneAPI Deep Neural Network Library Release Notes.
To configure your system, you need to:

Set Environment Variables for CLI Development

For working at a Command Line Interface (CLI), the tools in the oneAPI toolkits are configured via environment variables. Set up your CLI environment by
sourcing
the
setvars
script:
Option 1: Source setvars.sh once per session
Source
setvars.sh
every time you open a new terminal window:
You can find the
setvars.sh
script in the root folder of your oneAPI installation, which is typically
/opt/intel/oneapi/
for sudo or root users and
~/intel/oneapi/
when installed as a normal user.
For root or sudo installations:
. /opt/intel/oneapi/setvars.sh
For normal user installations:
. ~/intel/oneapi/setvars.sh
Option 2: One time setup for setvars.sh
To have the environment automatically set up for your projects, include the command
source <install_dir>/setvars.sh
in a startup script where it will be invoked automatically (replace
<install_dir>
with the path to your oneAPI install location). The default installation locations are
/opt/intel/oneapi/
for sudo or root users and
~/intel/oneapi/
when installed as a normal user.
For example, you can add the
source <install_dir>/setvars.sh
command to your
~/.bashrc
or
~/.bashrc_profile
or
~/.profile
file. To make the settings permanent for all accounts on your system, create a one-line
.sh
script in your system's
/etc/profile.d
folder that sources
setvars.sh
(for more details, see Ubuntu documentation on Environment Variables).
The
setvars.sh
script can also be managed using a configuration file. For more details, see Using a Configuration File to Manage Setvars.sh.

For GPU Users, Install GPU Drivers

If you followed the instructions in the Installation Guide to install GPU Drivers, you may skip this step. If you have not installed the drivers, follow the directions in the Installation Guide.

GPU: Disable Hangcheck

This section applies only to applications with long-running GPU compute workloads in native environments. It is not recommended for virtualizations or other standard usages of GPU, such as gaming.
A workload that takes more than four seconds for GPU hardware to execute is a long running workload. By default, individual threads that qualify as long-running workloads are considered hung and are terminated. By disabling the hangcheck timeout period, you can avoid this problem.
If the system is rebooted, hangcheck is automatically enabled. You must disable hangcheck again after every reboot or follow the directions to disable hangcheck persistently (across multiple reboots).
To disable hangcheck until the next reboot:
sudo sh -c "echo N> /sys/module/i915/parameters/enable_hangcheck"
To disable hangcheck across multiple reboots:
If the kernel is updated, hangcheck is automatically enabled. Run the procedure below after every kernel update to ensure hangcheck is disabled.
  1. Open a terminal.
  2. Open the
    grub
    file in
    /etc/default
    .
  3. In the grub file, find the line
    GRUB_CMDLINE_LINUX_DEFAULT=""
    .
  4. Enter this text between the quotes (""):
    i915.enable_hangcheck=0
  5. Run this command:
    sudo update-grub
  6. Reboot the system. Hangcheck remains disabled.

GPU: Add User to Video Group

For GPU compute workloads, non-root (normal) users do not typically have access to the GPU device. Make sure to add your normal user(s) to the
video
group; otherwise, binaries compiled for the GPU device will fail when executed by a normal user. To fix this problem, add the non-root user to the
video
group:
sudo usermod -a -G video <username>
For the most up-to-date requirements list, see the Intel
®
oneAPI Collective Communications Library Release Notes
.

Run a Sample Project

Run a sample project using the Command Line.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.