Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
058b4fbf
Commit
058b4fbf
authored
Jun 27, 2019
by
Leona C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR feedback updates
parent
79ceb6e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
20 deletions
+38
-20
generic-configs.rst
doc/sphinx/source/frameworks/generic-configs.rst
+38
-20
No files found.
doc/sphinx/source/frameworks/generic-configs.rst
View file @
058b4fbf
...
...
@@ -5,8 +5,8 @@ Integrating new frameworks
This section details some of the *configuration options* and some of the
*environment variables* that can be used to tune for optimal performance when
your system already has a version of nGraph installed with one o
f our supported
backends.
your system already has a version of nGraph installed with one o
r more of our
supported :doc:`../backends/index`.
Regardless of the framework, after the :doc:`../buildlb` step, a good place
to start usually involves making the libraries available to the framework. On
...
...
@@ -19,8 +19,8 @@ something like:
export LD_LIBRARY_PATH=path/to/ngraph_dist/lib/
Find or display
nGraph V
ersion
=======================
=======
Find or display
v
ersion
=======================
If you're working with the :doc:`../python_api/index`, the following command
may be useful:
...
...
@@ -29,15 +29,26 @@ may be useful:
python3 -c "import ngraph as ng; print('nGraph version: ',ng.__version__)";
To manually build a newer version than is available from the latest `PyPI`_
(:abbr:`Python Package Index (PyPI)`), see our nGraph Python API `BUILDING.md`_
documentation.
Localize environment variables
==============================
Another generic configuration option is to activate ``NGRAPH_CPU_DEBUG_TRACER``,
a runtime environment variable and useful tool for data scientists.
Activate logtrace-related environment variables
===============================================
Another generic configuration option is to activate ``NGRAPH_CPU_DEBUG_TRACER``,
a runtime environment variable that supports extra logging and debug detail.
This is a useful tool for data scientists interested in outputs from logtrace
files that can, for example, help in tracking down model convergences. It can
also help engineers who might want to add their new ``Backend`` to an existing
framework to compare intermediate tensors/values to references from a CPU
backend.
To activate this tool, set the ``env`` var ``NGRAPH_CPU_DEBUG_TRACER=1``.
It will dump ``trace_meta.log`` and ``trace_bin_data.log``.
It will dump ``trace_meta.log`` and ``trace_bin_data.log``. The names of the
logfiles can be customized.
To specify the names of logs with those flags:
...
...
@@ -46,11 +57,11 @@ To specify the names of logs with those flags:
NGRAPH_TRACER_LOG = "meta.log"
NGRAPH_BIN_TRACER_LOG = "bin.log"
The meta_log
line
contains::
The meta_log contains::
kernel_name, serial_number_of_op, tensor_id, symbol_of_in_out, num_elements, shape, binary_data_offset, mean_of_tensor, variance_of_tensor
A line example from unit-test might look like::
A line example from
a
unit-test might look like::
K=Add S=0 TID=0_0 >> size=4 Shape{2, 2} bin_data_offset=8 mean=1.5 var=1.25
...
...
@@ -58,6 +69,9 @@ The binary_log line contains::
tensor_id, binary data (tensor data)
A reference for the implementation of parsing these logfiles can also be found
in the unit test for this feature.
FMV
---
...
...
@@ -67,7 +81,7 @@ number of generic ways to patch or bring architecture-based optimizations to
the :abbr:`Operating System (OS)` that is handling your ML environment. See
the `GCC wiki for details`_.
If your nGraph build is a Neural Network configured on Clear Linux* OS
If your nGraph build is a Neural Network configured on Clear Linux
\
* OS
for Intel® Architecture, and it includes at least one older CPU, the
`following article may be helpful`_.
...
...
@@ -93,11 +107,14 @@ For CPU (and most cuDNN) backends, the preferred layout is currently ``NCHW``.
Intel® Math Kernel Library for Deep Neural Networks
---------------------------------------------------
-The following `KMP options`_ were originally optimized for models using the
.. important:: Intel® MKL-DNN is automatically enabled as part of an
nGraph default :doc:`build <../buildlb>`; you do *not* need to add it
separately or as an additional component to be able to use these
configuration settings.
The following `KMP`_ options were originally optimized for models using the
Intel® `MKL-DNN`_ to train models with the ``NCHW`` data layout; however, other
configurations can be explored. MKL-DNN is automatically enabled as part of an
nGraph compilation; you do *not* need to add MKL-DNN separately or as an
additional component to be able to use these configuration settings.
configurations can be explored.
* ``KMP_BLOCKTIME`` Sets the time, in milliseconds, that a thread should wait
after completing the execution of a parallel region, before sleeping.
...
...
@@ -158,7 +175,7 @@ Convolution shapes
``OMP_NUM_THREADS``
^^^^^^^^^^^^^^^^^^^
The best resource for this configuration option is the `gnu.org site`_
The best resource for this configuration option is the `gnu.org site`_
.
``OMP_NUM_THREADS`` defaults to the number of logical cores. To check the
number of cores on your system, you can run the following on the command-line to
see the details of your CPU:
...
...
@@ -201,11 +218,12 @@ achieve the best performance for NN workloads on CPU platforms. The nGraph
Compiler stack runs on transformers handled by Intel® Architecture (IA), and
thus can make more efficient use of the underlying hardware.
.. _KMP options: https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-controlling-thread-allocation
.. KMP options: https://software.intel.com/en-us/node/522691
.. _PyPI: https://pypi.org/project/ngraph-core
.. _KMP: https://software.intel.com/en-us/node/522691
.. _MKL-DNN: https://github.com/intel/mkl-dnn
.. _gnu.org site: https://gcc.gnu.org/onlinedocs/libgomp/Environment-Variables.html
.. _Movidius: https://www.movidius.com/
.. _BUILDING.md: https://github.com/NervanaSystems/ngraph/blob/master/python/BUILDING.md
.. _GCC wiki for details: https://gcc.gnu.org/wiki/FunctionMultiVersioning
.. _following article may be helpful: https://clearlinux.org/documentation/clear-linux/tutorials/fmv
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment