This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[NGRAPH] MXNet - nGraph initial integration #12502
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f2f574c
MXNet - nGraph initial integration
df69848
remove ngraph changes from ndarray
990e75d
remove all ndarray changes
ashokei d7d9488
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
ashokei ce7e114
address feedback comments
ashokei 342cdfe
enable ngraph backend in CI
ashokei fdcfdb9
Merge branch 'master' of https://github.com/apache/incubator-mxnet in…
ashokei dbe86d5
fix missing libmkldnn.so.0 in CI
ashokei 790d0fd
resolve CI issue
ashokei fb3853e
monitor callback disabled
ashokei 08bb32d
resolve merge conflict
ashokei 48fcb27
fix mxnet::ShapeVector
ashokei bf89281
fix license header
ashokei bb0ee91
fix flaky test
ashokei 9acec60
Merge branch 'master' into ngraph_initial_upstream
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ngraph-mxnet-bridge
added at
9af5ed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| <!--- Licensed to the Apache Software Foundation (ASF) under one --> | ||
| <!--- or more contributor license agreements. See the NOTICE file --> | ||
| <!--- distributed with this work for additional information --> | ||
| <!--- regarding copyright ownership. The ASF licenses this file --> | ||
| <!--- to you under the Apache License, Version 2.0 (the --> | ||
| <!--- "License"); you may not use this file except in compliance --> | ||
| <!--- with the License. You may obtain a copy of the License at --> | ||
|
|
||
| <!--- http://www.apache.org/licenses/LICENSE-2.0 --> | ||
|
|
||
| <!--- Unless required by applicable law or agreed to in writing, --> | ||
| <!--- software distributed under the License is distributed on an --> | ||
| <!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --> | ||
| <!--- KIND, either express or implied. See the License for the --> | ||
| <!--- specific language governing permissions and limitations --> | ||
| <!--- under the License. --> | ||
|
|
||
| # nGraph - MXNet Integration | ||
| MXNet nGraph integration is based on [Unified integration with external backend libraries](https://cwiki.apache.org/confluence/display/MXNET/Unified+integration+with+external+backend+libraries) | ||
|
|
||
| After building MXNet with nGraph support, users can enable nGraph backend by setting `MXNET_SUBGRAPH_BACKEND="ngraph"`environmental variable. | ||
|
|
||
| Gluon support is experimental and may or may not yield good performance. Gluon-NGraph | ||
| integration can be enabled by setting the environmental variable `MXNET_NGRAPH_GLUON=1` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is an additional evn var needed for Gluon? How different is it from
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use |
||
|
|
||
| ## Building with nGraph support | ||
| MXNet's experimental support for the Intel nGraph graph compiler can be enabled | ||
| using MXNet's build system. Current support is for Linux-based OS's, Mac and Windows | ||
| support will be added in future releases. | ||
|
|
||
| When building MXNet with experimental nGraph integration enabled, MXNet's build | ||
| system builds its own copy of the nGraph-supplied libraries. Upon successful | ||
| completion of an nGraph-enabled build, these libraries and related symbolic links | ||
| can be found in the same build directory as `libmxnet.so`. | ||
|
|
||
| If building with gnu make, use the command: | ||
|
|
||
| `make -j USE_NGRAPH=1` | ||
|
|
||
| If building with cmake, use the command: | ||
|
|
||
| `mkdir build && cd build && cmake ../ -DUSE_NGRAPH=1 && make -j` | ||
|
|
||
| ## Runtime environment variables | ||
| Some environment variables influence the behavior of the | ||
| nGraph-enabled MXNet software and supporting libraries. Here is a partial list of those variables: | ||
|
|
||
| | Variable | Description | | ||
| | :-------- | :---------- | | ||
| | `OMP_NUM_THREADS` | Suggested value: `16`. For more information please see [here](https://software.intel.com/en-us/mkl-windows-developer-guide-setting-the-number-of-threads-using-an-openmp-environment-variable) | | ||
| | `KMP_AFFINITY` | Suggested value: `granularity=fine,compact,1,0`. For more information please see [here](https://software.intel.com/en-us/node/522691). | | ||
| | `MXNET_NGRAPH_VERBOSE_GRAPH` | When set to `1`, nGraph-enabled MXNet will create in the current directory a JSON file representing each subgraph being compiled by the nGraph library. Each of these JSON files is a graph serialization that can be loaded by nGraph's `ngraph::deserialize` functions. | | ||
|
|
||
| ## Supported nGraph back-ends | ||
| The nGraph library supports a number of hardware and software backends, including `"CPU"`, `"INTERPETER"` (reference kernels), `"GPU"`, and `"IntelGPU"`. Current experimental integration enables `"CPU"` backend by default. More backends will be supported in future releases. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.