Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit d2cd873

Browse files
authored
Merge pull request #4179 from NervanaSystems/cyphers/m28
Cyphers/m28
2 parents ac27139 + bbe4e08 commit d2cd873

File tree

81 files changed

+4031
-774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4031
-774
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ option(NGRAPH_USE_LEGACY_MKLDNN "Use legacy MKLDNN" FALSE)
169169
option(NGRAPH_MLIR_ENABLE "Control the building of MLIR backend" FALSE)
170170
option(NGRAPH_INTERPRETER_ENABLE "Control the building of the INTERPRETER backend" TRUE)
171171
option(NGRAPH_NOP_ENABLE "Control the building of the NOP backend" TRUE)
172-
option(NGRAPH_GENERIC_CPU_ENABLE "Enable build nGraph for generic CPU backend" FALSE)
172+
option(NGRAPH_GENERIC_CPU_ENABLE "Enable build nGraph for generic CPU backend" TRUE)
173173
option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" FALSE)
174174
option(NGRAPH_DEPRECATED_ENABLE "Enable compiler deprecation pragmas for deprecated APIs (recommended only for development use)" FALSE)
175175
option(NGRAPH_ONNX_IMPORT_ENABLE "Enable ONNX importer" FALSE)
@@ -199,10 +199,7 @@ if (NGRAPH_STATIC_LIB_ENABLE)
199199
set(NGRAPH_EXPORT_TARGETS_ENABLE OFF)
200200
endif()
201201

202-
if (NGRAPH_CPU_ENABLE
203-
AND
204-
(NOT NGRAPH_GENERIC_CPU_ENABLE)
205-
)
202+
if (NGRAPH_CPU_ENABLE)
206203
set(NGRAPH_INTEL_CPU_ONLY_ENABLE ON)
207204
endif()
208205

doc/sphinx/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@
7373
# built documents.
7474
#
7575
# The short X.Y version.
76-
version = '0.27'
76+
version = '0.28'
7777

7878
# The Documentation full version, including alpha/beta/rc tags. Some features
7979
# available in the latest code will not necessarily be documented first
80-
release = '0.27.1'
80+
release = '0.28.0'
8181

8282
# The language for content autogenerated by Sphinx. Refer to documentation
8383
# for a list of supported languages.
@@ -143,6 +143,7 @@
143143
]
144144
}
145145

146+
html_last_updated_fmt= ''
146147

147148
# -- Options for HTMLHelp output ------------------------------------------
148149

doc/sphinx/source/ops/constant.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ Outputs
4343
C++ Interface
4444
=============
4545

46-
.. doxygenclass:: ngraph::op::Constant
46+
.. doxygenclass:: ngraph::op::v0::Constant
4747
:project: ngraph
4848
:members:

doc/sphinx/source/ops/parameter.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Parameter
55
#########
66

7-
.. code-block: cpp
7+
.. code-block:: cpp
88
99
Parameter // A function parameter.
1010
@@ -38,7 +38,9 @@ Outputs
3838
| ``output`` | ``element_type`` | ``shape`` |
3939
+------------+------------------+------------+
4040

41-
A ``Parameter`` produces the value of the tensor passed to the function in the position of the parameter in the function's arguments. The passed tensor must have the element type and shape specified by the parameter.
41+
A ``Parameter`` produces the value of the tensor passed to the function
42+
in the position of the parameter in the function's arguments. The passed
43+
tensor must have the element type and shape specified by the parameter.
4244

4345
Backprop
4446
========
@@ -51,6 +53,6 @@ Backprop
5153
C++ Interface
5254
=============
5355

54-
.. doxygenclass:: ngraph::op::Parameter
56+
.. doxygenclass:: ngraph::op::v0::Parameter
5557
:project: ngraph
5658
:members:

doc/sphinx/source/ops/result.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ Mathematical Definition
4545
C++ Interface
4646
=============
4747

48-
.. doxygenclass:: ngraph::op::Result
48+
.. doxygenclass:: ngraph::op::v0::Result
4949
:project: ngraph
5050
:members:

doc/sphinx/source/project/release-notes.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,15 @@ We are pleased to announce the release of version |version|.
2121
Core updates for |version|
2222
--------------------------
2323

24-
+ New ops
25-
+ Provenance improvements from 0.25.1
26-
+ More dynamic shape ops
27-
+ More informative errors
28-
2924

3025

3126
Latest documentation updates
3227
----------------------------
3328

34-
+ Additional details on quantization
35-
+ Index updates
36-
+ API updates
29+
+ Dynamic Shapes and APIs
30+
+ Provenance
31+
+ Add linkages and overview for quantization APIs
32+
+ New ngraph.ai themed illustrations
3733

3834
.. important:: Pre-releases (``-rc-0.*``) have newer features, and are less stable.
3935

@@ -42,6 +38,16 @@ Latest documentation updates
4238
Changelog on Previous Releases
4339
==============================
4440

41+
0.27.1
42+
43+
+ Fixes broken serializer for Sum and Product
44+
+ New ops
45+
+ Provenance improvements from 0.25.1
46+
+ More dynamic shape ops
47+
+ More informative errors
48+
+ Additional details on quantization
49+
+ Index updates
50+
+ API updates
4551
+ All ops support ``Output<Node>`` arguments
4652
+ Additional ops
4753
+ ONNX handling unknown domains

doc/sphinx/source/training/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
Distributed Training
66
####################
77

8+
.. important:: Distributed training for CPU backend is not supported. Distributed
9+
training support is provided only with the Intel® Nervana™ Neural Network Processor
10+
for Training (NNP-T).
811

912
.. toctree::
1013
:maxdepth: 1
1114

12-
overview.rst
1315
data_ingest.rst
1416

17+
18+
Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
1+
:orphan:
2+
13
.. training/overview.rst:
24
35
.. _overview:
46

57
Basic Concepts
68
==============
79

8-
.. important:: Distributed training is not officially supported as of version
9-
|version|; however, some configuration options have worked for nGraph
10-
devices in testing environments.
11-
12-
13-
Data scientists with locally-scalable rack or cloud-based resources will likely
14-
find it worthwhile to experiment with different modes or variations of
15-
distributed training. Deployments using nGraph Library with supported backends
16-
can be configured to train with data parallelism and will soon work with model
17-
parallelism. Distributing workloads is increasingly important, as more data and
18-
bigger models mean the ability to :doc:`../core/constructing-graphs/distribute-train`
19-
work with larger and larger datasets, or to work with models having many layers
20-
that aren't designed to fit to a single device.
21-
22-
Distributed training with data parallelism splits the data and each worker
23-
node has the same model; during each iteration, the gradients are aggregated
24-
across all workers with an op that performs "allreduce", and applied to update
25-
the weights.
26-
27-
Using multiple machines helps to scale and speed up deep learning. With large
28-
mini-batch training, one could train ResNet-50 with Imagenet-1k data to the
29-
*Top 5* classifier in minutes using thousands of CPU nodes. See
30-
`arxiv.org/abs/1709.05011`_.
31-
32-
.. _arxiv.org/abs/1709.05011: https://arxiv.org/format/1709.05011

python/setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
PYNGRAPH_ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
2727
NGRAPH_DEFAULT_INSTALL_DIR = os.environ.get('HOME')
2828
NGRAPH_ONNX_IMPORT_ENABLE = os.environ.get('NGRAPH_ONNX_IMPORT_ENABLE')
29+
NGRAPH_PYTHON_DEBUG = os.environ.get('NGRAPH_PYTHON_DEBUG')
2930

3031

3132
def find_ngraph_dist_dir():
@@ -367,6 +368,13 @@ def _add_extra_compile_arg(self, flag, compile_args):
367368
return True
368369
return False
369370

371+
def add_debug_or_release_flags(self):
372+
"""Return compiler flags for Release and Debug build types."""
373+
if NGRAPH_PYTHON_DEBUG in ['TRUE', 'ON', True]:
374+
return ['-O0', '-g']
375+
else:
376+
return ['-O2', '-D_FORTIFY_SOURCE=2']
377+
370378
def build_extensions(self):
371379
"""Build extension providing extra compiler flags."""
372380
if sys.platform == 'win32':
@@ -388,7 +396,8 @@ def build_extensions(self):
388396
add_platform_specific_link_args(ext.extra_link_args)
389397

390398
ext.extra_compile_args += ['-Wformat', '-Wformat-security']
391-
ext.extra_compile_args += ['-O2', '-D_FORTIFY_SOURCE=2']
399+
ext.extra_compile_args += self.add_debug_or_release_flags()
400+
392401
if sys.platform == 'darwin':
393402
ext.extra_compile_args += ['-stdlib=libc++']
394403
build_ext.build_extensions(self)

src/contrib/mlir/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ add_subdirectory(tools/ngraph-opt)
2525
set(SRC
2626
backend/cpu/cpu_backend.cpp
2727
backend/pass/affine_lowerer.cpp
28-
backend/pass/memory_optimization.cpp
28+
backend/analysis/memory_analysis.cpp
2929
core/compiler.cpp
3030
core/ngraph_dialect/dialect.cpp
3131
core/ngraph_dialect/type.cpp

0 commit comments

Comments
 (0)