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

Commit 67bfc99

Browse files
authored
Prepare release v0.14.0 (#318)
1 parent 9984a0d commit 67bfc99

File tree

3 files changed

+52
-16
lines changed

3 files changed

+52
-16
lines changed

BUILDING.md

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ You can verify whether you have version `>=2.6.1` installed using the command:
2222
$ protoc --version
2323
libprotoc 3.4.0
2424

25-
2625
#### nGraph
2726

2827
The other requirement is of course nGraph and nGraph's Python bindings.
@@ -33,25 +32,36 @@ You can follow these instructions to build an nGraph Python wheel containing bot
3332
Prepare System:
3433

3534
# apt update
36-
# apt install python3 python3-pip python3-dev
37-
# apt install build-essential cmake curl clang-3.9 git zlib1g zlib1g-dev libtinfo-dev
35+
# apt install python3 python3-pip python3-dev python-virtualenv
36+
# apt install build-essential cmake curl clang-3.9 git zlib1g zlib1g-dev libtinfo-dev unzip autoconf automake libtool
3837

39-
Clone nGraph's `v0.10.0` tag, build and install it into `$HOME/ngraph_dist`:
38+
Clone nGraph's `v0.14.0` tag, build and install it into `$HOME/ngraph_dist`:
4039

41-
$ git clone -b 'v0.10.0' --single-branch --depth 1 https://github.com/NervanaSystems/ngraph.git
40+
$ cd # Change directory to where you would like to clone nGraph sources
41+
$ git clone -b 'v0.14.0' --single-branch --depth 1 https://github.com/NervanaSystems/ngraph.git
4242
$ mkdir ngraph/build
4343
$ cd ngraph/build
44-
$ cmake ../ -DNGRAPH_USE_PREBUILT_LLVM=TRUE -DCMAKE_INSTALL_PREFIX=$HOME/ngraph_dist -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE
44+
$ cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/ngraph_dist -DNGRAPH_ONNX_IMPORT_ENABLE=TRUE -DNGRAPH_USE_PREBUILT_LLVM=TRUE
4545
$ make
4646
$ make install
4747

48+
Prepare a Python virtual environment for nGraph (recommended):
49+
50+
$ mkdir -p ~/.virtualenvs && cd ~/.virtualenvs
51+
$ virtualenv -p $(which python3) nGraph
52+
$ source nGraph/bin/activate
53+
(nGraph) $
54+
4855
Build Python package (Binary wheel) for nGraph:
4956

50-
$ cd ngraph/python
51-
$ git clone --recursive -b allow-nonconstructible-holders https://github.com/jagerman/pybind11.git
52-
$ export PYBIND_HEADERS_PATH=$PWD/pybind11
53-
$ export NGRAPH_CPP_BUILD_PATH=$HOME/ngraph_dist
54-
$ python3 setup.py bdist_wheel
57+
(nGraph) $ cd # Change directory to where you have cloned nGraph sources
58+
(nGraph) $ cd ngraph/python
59+
(nGraph) $ git clone --recursive https://github.com/jagerman/pybind11.git
60+
(nGraph) $ export PYBIND_HEADERS_PATH=$PWD/pybind11
61+
(nGraph) $ export NGRAPH_CPP_BUILD_PATH=$HOME/ngraph_dist
62+
(nGraph) $ export NGRAPH_ONNX_IMPORT_ENABLE=TRUE
63+
(nGraph) $ pip install numpy
64+
(nGraph) $ python setup.py bdist_wheel
5565

5666
For additional information how to build nGraph Python bindings see:
5767

@@ -61,7 +71,7 @@ Once the Python binary wheel file (`ngraph-*.whl`) is prepared you can install i
6171

6272
For example:
6373

64-
(your_venv) $ pip install -U dist/ngraph-0.10.0-cp35-cp35m-linux_x86_64.whl
74+
(nGraph) $ pip install -U dist/ngraph_core-0.0.0.dev0-cp35-cp35m-linux_x86_64.whl
6575

6676
You can check that nGraph is properly installed in your Python shell:
6777

@@ -71,12 +81,27 @@ You can check that nGraph is properly installed in your Python shell:
7181
<Abs: 'Abs_1' ([2, 3])>
7282
```
7383

74-
If you don't see any errors, nGraph should be installed correctly.
84+
Additionally check that nGraph and nGraph's Python wheel were both build with the `NGRAPH_ONNX_IMPORT_ENABLE` option:
7585

86+
```python
87+
from ngraph.impl import onnx_import
88+
```
89+
90+
If you don't see any errors, nGraph should be installed correctly.
7691

7792
### Installing ngraph-onnx
7893

79-
You can install ngraph-onnx using pip:
94+
You can install ngraph-onnx using the following commands. Clone `ngraph-onnx` sources to the same directory where you cloned `ngraph` sources.
95+
96+
(nGraph) $ cd # Change directory to where you have cloned nGraph sources
97+
(nGraph) $ git clone -b 'v0.14.0' --single-branch --depth 1 https://github.com/NervanaSystems/ngraph-onnx.git
98+
(nGraph) $ cd ngraph-onnx
99+
(nGraph) $ pip install -r requirements.txt
100+
(nGraph) $ pip install -r requirements_test.txt
101+
(nGraph) $ pip install -e .
80102

81-
(your_venv) $ pip install git+https://github.com/NervanaSystems/ngraph-onnx/@v0.10.0
103+
#### Running tests
82104

105+
(nGraph) $ pytest tests/ --backend=CPU -v
106+
(nGraph) $ pytest tests_core/ --backend=CPU -v
107+
(nGraph) $ NGRAPH_BACKEND=CPU TOX_INSTALL_NGRAPH_FROM=../ngraph/python tox

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
SOURCES_ROOT = path.abspath(path.dirname(__file__))
99

1010
setup(name='ngraph-onnx',
11-
version='0.10.0',
11+
version='0.14.0',
1212
description='nGraph Backend for ONNX',
1313
long_description=open(path.join(SOURCES_ROOT, 'README.md')).read(),
1414
long_description_content_type='text/markdown',

tests_core/test_backend.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
# import all test cases at global scope to make them visible to python.unittest
3636
backend_test = onnx.backend.test.BackendTest(NgraphBackend, __name__)
3737

38+
# Fixed in nGraph after 0.14.0
39+
backend_test.exclude('test_acosh')
40+
backend_test.exclude('test_acosh_example')
41+
backend_test.exclude('test_asinh')
42+
backend_test.exclude('test_asinh_example')
43+
backend_test.exclude('test_atanh')
44+
backend_test.exclude('test_atanh_example')
45+
backend_test.exclude('test_sign')
46+
backend_test.exclude('test_where_example')
47+
backend_test.exclude('test_sign_model')
48+
3849
# MaxPool Indices -> NGRAPH-3131
3950
backend_test.exclude('test_maxpool_with_argmax')
4051

0 commit comments

Comments
 (0)