From 6ec08d377e18df9ed2da9dc70adfaa5034bc5c56 Mon Sep 17 00:00:00 2001 From: Elena Totmenina Date: Wed, 26 May 2021 13:02:35 +0300 Subject: [PATCH] Docs how set up machine for gdb (#396) * Add docs * Move set_up_machine to debugging * Fix style in set_up_machine * Fix spelling in debugging_environment --- .../debugging/debugging_environment.rst | 4 +- docs/user_guides/debugging/index.rst | 1 + docs/user_guides/debugging/set_up_machine.rst | 89 +++++++++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 docs/user_guides/debugging/set_up_machine.rst diff --git a/docs/user_guides/debugging/debugging_environment.rst b/docs/user_guides/debugging/debugging_environment.rst index ae87149886..81f0d9371b 100644 --- a/docs/user_guides/debugging/debugging_environment.rst +++ b/docs/user_guides/debugging/debugging_environment.rst @@ -45,8 +45,8 @@ Activate NEO drivers Further, if you want to use local NEO driver, you need to activate the variables for it. -Checking debuggin environment ------------------------------ +Checking debugging environment +------------------------------ You can check the correctness of the work with the following example: diff --git a/docs/user_guides/debugging/index.rst b/docs/user_guides/debugging/index.rst index 32aa3586b6..54d4c031b8 100644 --- a/docs/user_guides/debugging/index.rst +++ b/docs/user_guides/debugging/index.rst @@ -27,6 +27,7 @@ the relevant documentation can be found at `Intel® Distribution for GDB documen .. toctree:: :maxdepth: 2 + set_up_machine debugging_environment diff --git a/docs/user_guides/debugging/set_up_machine.rst b/docs/user_guides/debugging/set_up_machine.rst new file mode 100644 index 0000000000..eac9d572c5 --- /dev/null +++ b/docs/user_guides/debugging/set_up_machine.rst @@ -0,0 +1,89 @@ +Setting up the machine for debugging +==================================== + +Graphics driver +--------------- + +You need to install drivers using following guides: + + - `GPGPU Documents / Installation guides`_ + - `Intel® oneAPI Toolkits Installation Guide for Linux* OS / Installation Guide / Install Intel GPU Drivers`_ + +.. _`GPGPU Documents / Installation guides`: https://dgpu-docs.intel.com/installation-guides/index.html +.. _`Intel® oneAPI Toolkits Installation Guide for Linux* OS / Installation Guide / Install Intel GPU Drivers`: + https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/prerequisites/install-intel-gpu-drivers.html + +It is also important that the user is in the group "video" (on Ubuntu* 18, Fedora* 30, and SLES* 15 SP1) +or "render" (on Ubuntu* 19 and higher, CentOS* 8, and Fedora* 31). +An administrator with sudo or root privilege can change the group owner of `/dev/dri/renderD*` and `/dev/dri/card*` +to a group ID used by your user base: + +.. code-block:: bash + + sudo usermod -a -G video + + +NEO driver +---------- + +NEO driver at least `21.15.19533` version is required to make debugger work correctly. + +Follow the `link `_ below to download the drivers. + +1) To install the driver on the system, use the command: + +.. code-block:: bash + + sudo dpkg -i *.deb + +2) To install the NEO driver locally follow the commands below: + +.. code-block:: bash + + cd /path/to/my/neo + for file in `ls *.deb`; do dpkg -x $file .; done + export MY_ACTIVE_NEO=/path/to/my/neo/usr/local/lib + export LD_LIBRARY_PATH=${MY_ACTIVE_NEO}:${MY_ACTIVE_NEO}/intel-opencl:$LD_LIBRARY_PATH + +The Installable Client Driver (ICD) uses the system implementation for OpenCL by default. +You will also need to add environment variables to change the behavior of the ICD. +Add all needed from "/etc/OpenCL/vendors/" and custom to `OCL_ICD_FILENAMES`. + +.. code-block:: bash + + export OCL_ICD_FILENAMES=/path/to/my/neo/usr/local/lib/intel-opencl/libigdrcl.so:/optional/from/vendors/libintelocl.so + export OCL_ICD_VENDORS= + +See also: + + - `Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver `_ + - `Intel(R) Graphics Compute Runtime Releases `_ + - `OpenCL ICD Loader `_ + + +DCD driver +---------- + +To install the DCD (Debugger Companion Driver) driver from oneAPI into the system, use the following command: + +.. code-block:: bash + + sudo dpkg -i /path/to/oneapi/debugger/latest/igfxdcd-*-Linux.deb + +Before working, you must activate it: + +.. code-block:: bash + + sudo modinfo igfxdcd + +Also, you must remove the driver from the system if you want to install a different version: + +.. code-block:: bash + + sudo dpkg -r igfxdcd + +If you are installing DCD for the first time, you need to create keys. + +See also: + + - `Get Started with Intel® Distribution for GDB* on Linux* OS Host `_