Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize quantize #1762

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
9a34089
Add more type support for OneHot op (#1565)
hariharans29 Aug 7, 2019
aeb0bcb
parallel build
snnn Aug 6, 2019
a93ece2
update quatizelinear to process int8 input (#1576)
askhade Aug 7, 2019
a443b01
Remove unneeded C APIs + some refactoring. (#1555)
pranavsharma Aug 7, 2019
6e430c0
A few performance improvements coming out of ssd_mobilenet and ssd_re…
skottmckay Aug 7, 2019
38d7854
Fix race condition issue in RNN/LSTM/GRU (#1544)
HectorSVC Aug 8, 2019
1c5b15c
Remove memory copy between TensorRT and CUDA (#1561)
stevenlix Aug 9, 2019
9b83545
Optimize Fence checking performance (#1593)
ybrnathan Aug 9, 2019
6d783e8
Added license files in the base image (#1595)
manashgoswami Aug 9, 2019
0187d87
Implement new LabelEncoder in opset 2 in ML domain (#1393)
wschin Aug 9, 2019
59c9d83
add int64 support for less op. (#1604)
linkerzhang Aug 10, 2019
7be40b2
put all gemmlowp common code in one place (#1590)
askhade Aug 11, 2019
69baf9e
Update nGraph to v0.22.1 (#1582)
Aug 11, 2019
df9b1b8
Include io_win32.h only if builds on windows (#1587)
smuzaffar Aug 12, 2019
ce3c8f9
Fix for CPU random ops seed narrowing conversion. (#1594)
AlbertSadovnikov Aug 12, 2019
a6a4c4c
Fix perf test executable. (#1598)
pranavsharma Aug 12, 2019
8a559d7
Minor perf improvements. (#1580)
skottmckay Aug 12, 2019
a50a63a
Serialize optimized onnx model (#1470)
pulkittomar Aug 13, 2019
b5de132
Fix log message truncation on Windows when printf formatting is used.…
skottmckay Aug 13, 2019
b405482
Remove copy of generator in Multinomial (#1611)
skottmckay Aug 14, 2019
bd64ca3
Kezhan/execute graph refactoring (#1553)
linkerzhang Aug 14, 2019
a6a5ace
Cleanup csharp API SessionOptions and RunOptions to be consistent wit…
shahasad Aug 14, 2019
09db1e0
Make changes to pipeline template to include missing headers in tars/…
hariharans29 Aug 14, 2019
24d17f4
Fix trtlogger segfault. re-enable SoftPlus unit test for TRT. add doc…
jywu-msft Aug 14, 2019
8d12ce4
Use a friendly enum for graph optimization level. (#1586)
pranavsharma Aug 15, 2019
0c5d2c9
Generate documentation from the registered operator kernels (#1395)
shahasad Aug 15, 2019
7545b79
Fix incorrect box offset computation in NMS op (#1624)
hariharans29 Aug 15, 2019
17c8fe4
Integrate featurizers (#1573)
yuslepukhin Aug 15, 2019
1835640
Support int64 for ReduceMax (#1625)
hariharans29 Aug 15, 2019
0044be6
update onnx to latest commit (#1622)
askhade Aug 16, 2019
c9eb13a
Copy System.Numerics.Tensors sources from dotnet/corefx into onnxrunt…
shahasad Aug 16, 2019
f983410
removed --gen_doc (#1633)
shahasad Aug 16, 2019
44a42a6
Fix parsing initial hidden state in RNN (#1626)
hariharans29 Aug 16, 2019
6b89c7a
Let mlas use session thread pool (#1609)
snnn Aug 16, 2019
372b657
update TRT EP CI's to use latest model.zip (#1637)
jywu-msft Aug 17, 2019
fbd790f
Add AutoML to 3 main builds. (#1631)
yuslepukhin Aug 17, 2019
bc72c2d
MLAS: add U8U8 MatMul operation (#1644)
tracysh Aug 19, 2019
b963e4b
Add uint8 Support for NonZero Op (#1614)
lara-hdr Aug 19, 2019
bdc6943
update MKLML to version which contains fix for thread hang. (#1636)
jywu-msft Aug 19, 2019
4137303
MlasGetMaximumThreadCount: plus 1 to the NumThreads from ORT thread p…
snnn Aug 19, 2019
6f3a835
Update perf tool documentation to reflect the new graph optimization …
pranavsharma Aug 19, 2019
224dde7
Allow user disable multiple threading (#1647)
snnn Aug 20, 2019
377dcf6
Update onnx test runner documentation (#1651)
pranavsharma Aug 20, 2019
a1b3c64
Fix memory leak in mlas unitest (#1654)
snnn Aug 20, 2019
68d496c
fix bug on windows where ops were always getting dumped. (#1648)
jywu-msft Aug 20, 2019
7be5695
Remove --whole-archive (#1655)
snnn Aug 20, 2019
5311c1b
Check return value form CreateFeedsFetchesManager. (#1653)
skottmckay Aug 20, 2019
d0d8243
Update PyTorch Section for supported onnx version (#1635)
EmmaNingMS Aug 20, 2019
e652a23
cudnnRNNForwardInferenceEx doesn't support 0 sequence in the bathes
HectorSVC Aug 21, 2019
a68a20e
Add details of which node was not able to be placed on an execution p…
skottmckay Aug 21, 2019
97d0a46
nGraph EP Optimizations (#1630)
tvtrimel Aug 21, 2019
6f70a78
Fix a few errors in the NuGet pipeline (still broken) (#1656)
shahasad Aug 21, 2019
b53f40a
update set fetches for execution with allocation plan. (#1668)
linkerzhang Aug 22, 2019
a818740
Support Tensor<bool> and Tensor<Int8> in C# API. Support Tensor<strin…
shahasad Aug 22, 2019
4de0aa8
Optimize kernel index (#1672)
snnn Aug 22, 2019
d2569d3
update clip for opset 11 (#1661)
askhade Aug 22, 2019
c9a4fe2
Add support of ReduceSum int64 (#1664)
yufenglee Aug 22, 2019
addf32f
int64 support for 'where' op (#1666)
neginraoof Aug 22, 2019
7408dec
Added some mo optimizations to improve performance (#1674)
suryasidd Aug 23, 2019
4035fe8
Don't create the default allocator every single time. Rename API acco…
pranavsharma Aug 23, 2019
5873bdb
Share default CPU allocator with Mlas preferred alignment (#1682)
Aug 23, 2019
f25847b
More fixes on the NuGet CPU CI pipeline (#1688)
shahasad Aug 24, 2019
a8998b0
treat zero point properly (#1686)
tracysh Aug 26, 2019
961b14a
use MLAS for QGEMM in matmulInteger and convInteger (#1692)
askhade Aug 27, 2019
938200d
fix typo in max batch size error msg. (#1687)
jywu-msft Aug 27, 2019
121d308
Python API naming and other cleanup (#1678)
shahasad Aug 27, 2019
8813b79
make gemmlowp default for arm (#1701)
askhade Aug 27, 2019
d9cdf4b
Doc updates (#1522)
faxu Aug 28, 2019
14eae29
remove @PCGOTREL x64 usage (#1707)
tracysh Aug 28, 2019
73312b8
MLAS: Android sgemm kernel build fix (#1710)
tracysh Aug 28, 2019
81ad480
Remove TaskThreadPool (#1713)
snnn Aug 29, 2019
8fc8910
Allow input used across execution providers as long as they use the s…
Aug 29, 2019
068b568
Add support for int8 x uint8 for MatMulInteger, and int16 x int16 cus…
Aug 29, 2019
0f7c01b
Use exec form of ENTRYPOINT for docker server (#1690)
rakelkar Aug 29, 2019
4b5b037
Support 'Bilinear' mode for 2D inputs in Resize and Upsample kernels …
hariharans29 Aug 29, 2019
e54904e
add implementation for dynamic quantize linear (#1697)
askhade Aug 29, 2019
25d02a3
Fix reading of onnx domain causing one of the automl models to break …
pranavsharma Aug 29, 2019
810ee00
Fix a issue that CUDA EP fallback to much nodes to CPU for some case …
HectorSVC Aug 29, 2019
833e183
Publish perf tool with nightly build (#1728)
shahasad Aug 30, 2019
dc9c895
Update the docker file for OpenVINO (#1741)
HectorSVC Aug 31, 2019
2598637
Fix typo in NMS code
take-cheeze Aug 31, 2019
f4a6d26
MKL-DNN EP: control flow fix (#1740)
sreekanth-yalachigere Aug 31, 2019
c9240f4
Implementation of Nuphar execution provider (#881)
Sep 2, 2019
ad7ab3d
Enforce shape validation. (#1716)
pranavsharma Sep 3, 2019
0f6cf9a
enable quantizing specific nodes (#1742)
askhade Sep 3, 2019
cddc80c
Merge branch 'master' into askhade/optimize_quantize
askhade Sep 3, 2019
75a3dd4
update quantization script
askhade Sep 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
[submodule "cmake/external/re2"]
path = cmake/external/re2
url = https://github.com/google/re2.git
[submodule "cmake/external/onnx-tensorrt"]
path = cmake/external/onnx-tensorrt
url = https://github.com/onnx/onnx-tensorrt.git
branch = v5.0
[submodule "cmake/external/eigen"]
path = cmake/external/eigen
url = https://github.com/eigenteam/eigen-git-mirror.git
Expand All @@ -41,3 +37,7 @@
[submodule "cmake/external/spdlog"]
path = cmake/external/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "cmake/external/onnx-tensorrt"]
path = cmake/external/onnx-tensorrt
url = https://github.com/onnx/onnx-tensorrt.git
branch = 5.1
328 changes: 204 additions & 124 deletions BUILD.md

Large diffs are not rendered by default.

93 changes: 60 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@
[ONNX](https://onnx.ai) is an interoperable format for machine learning models supported by various ML and DNN frameworks and tools. The universal format makes it easier to interoperate between frameworks and maximize the reach of hardware optimization investments.

***
**[Key Features](#key-features)**

**Setup**
* [Installation](#installation)
* [APIs and Official Binaries](#apis-and-official-builds)
* [Building from Source](#building-from-source)

**Getting Started**
**Usage**
* [Getting ONNX Models](#getting-onnx-models)
* [Deploying ONNX Runtime](#deploying-onnx-runtime)
* [Examples and Tutorials](#examples-and-tutorials)
* [Performance Tuning](#performance-tuning)

**[Examples and Tutorials](#examples-and-tutorials)**

**More Info**
* [Technical Design Details](#technical-design-details)
Expand All @@ -29,39 +33,43 @@

**[License](#license)**
***
## Key Features
### Run any ONNX model
# Key Features
## Run any ONNX model
ONNX Runtime provides comprehensive support of the ONNX spec and can be used to run all models based on ONNX v1.2.1 and higher. See version compatibility details [here](https://github.com/microsoft/onnxruntime/blob/master/docs/Versioning.md).

*Note: Some operators not supported in the current ONNX version may be available as a [Contrib Operator](https://github.com/microsoft/onnxruntime/blob/master/docs/ContribOperators.md)*

**Traditional ML support**

In addition to DNN models, ONNX Runtime fully supports the [ONNX-ML profile](https://github.com/onnx/onnx/blob/master/docs/Operators-ml.md) of the ONNX spec for traditional ML scenarios.

### High Performance
For the full set of operators and types supported, please see [operator documentation](https://github.com/microsoft/onnxruntime/blob/master/docs/OperatorKernels.md)

*Note: Some operators not supported in the current ONNX version may be available as a [Contrib Operator](https://github.com/microsoft/onnxruntime/blob/master/docs/ContribOperators.md)*


## High Performance
ONNX Runtime supports both CPU and GPU. Using various graph optimizations and accelerators, ONNX Runtime can provide lower latency compared to other runtimes for faster end-to-end customer experiences and minimized machine utilization costs.

Currently ONNX Runtime supports the following accelerators:
* CPU
* MLAS (Microsoft Linear Algebra Subprograms)
* MKL-DNN
* MKL-ML
* [Intel nGraph](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/nGraph-ExecutionProvider.md)
* GPU
* CUDA
* [TensorRT](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/TensorRT-ExecutionProvider.md)
* MLAS (Microsoft Linear Algebra Subprograms)
* [MKL-DNN](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/MKL-DNN-ExecutionProvider.md) - [subgraph optimization](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/MKL-DNN-Subgraphs.md)
* MKL-ML
* [Intel nGraph](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/nGraph-ExecutionProvider.md)
* CUDA
* [TensorRT](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/TensorRT-ExecutionProvider.md)
* [OpenVINO](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/OpenVINO-ExecutionProvider.md)
* [Nuphar](docs/execution_providers/Nuphar-ExecutionProvider.md)

Not all variations are supported in the [official release builds](#apis-and-official-builds), but can be built from source following [these instructions](https://github.com/Microsoft/onnxruntime/blob/master/BUILD.md).
Not all variations are supported in the [official release builds](#apis-and-official-builds), but can be built from source following [these instructions](https://github.com/Microsoft/onnxruntime/blob/master/BUILD.md). Find Dockerfiles [here](https://github.com/microsoft/onnxruntime/tree/master/dockerfiles).

We are continuously working to integrate new execution providers for further improvements in latency and efficiency. If you are interested in contributing a new execution provider, please see [this page](docs/AddingExecutionProvider.md).

### Cross Platform

## Cross Platform
[API documentation and package installation](https://github.com/microsoft/onnxruntime#installation)

ONNX Runtime is available for Linux, Windows, Mac with Python, C#, and C APIs, with more to come!
If you have specific scenarios that are not currently supported, please share your suggestions and scenario details via [Github Issues](https://github.com/microsoft/onnxruntime/issues).

***
# Installation
**Quick Start:** The [ONNX-Ecosystem Docker container image](https://github.com/onnx/onnx-docker/tree/master/onnx-ecosystem) is available on Dockerhub and includes ONNX Runtime (CPU, Python), dependencies, tools to convert from various frameworks, and Jupyter notebooks to help get started.

Expand All @@ -80,28 +88,34 @@ Additional dockerfiles for some features can be found [here](https://github.com/
|---|:---|:---|:---|
| **Python** | **[pypi: onnxruntime](https://pypi.org/project/onnxruntime)**<br><br>Windows (x64)<br>Linux (x64)<br>Mac OS X (x64) | -- | **[pypi: onnxruntime-gpu](https://pypi.org/project/onnxruntime-gpu)**<br><br>Windows (x64)<br>Linux (x64) |
| **C#** | **[Nuget: Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime/)**<br><br>Windows (x64, x86)<br>Linux (x64, x86)<br>Mac OS X (x64) | **[Nuget: Microsoft.ML.OnnxRuntime.MKLML](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.MKLML/)**<br><br>Windows (x64)<br>Linux (x64)<br>Mac OS X (x64) | **[Nuget: Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu/)**<br><br>Windows (x64)<br>Linux (x64) |
| **C** | **[Nuget: Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime)**<br><br>**[.zip, .tgz](https://aka.ms/onnxruntime-release)**<br><br>Windows (x64, x86)<br>Linux (x64, x86)<br>Mac OS X (x64 | **[Nuget: Microsoft.ML.OnnxRuntime.MKLML](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.MKLML/)**<br><br>Windows (x64)<br>Linux (x64)<br>Mac OS X (x64) | **[Nuget: Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu/)**<br><br>**[.zip, .tgz](https://aka.ms/onnxruntime-release)**<br><br>Windows (x64)<br>Linux (x64) |
| **C/C++ wrapper** | **[Nuget: Microsoft.ML.OnnxRuntime](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime)**<br><br>**[.zip, .tgz](https://aka.ms/onnxruntime-release)**<br><br>Windows (x64, x86)<br>Linux (x64, x86)<br>Mac OS X (x64) | **[Nuget: Microsoft.ML.OnnxRuntime.MKLML](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.MKLML/)**<br><br>Windows (x64)<br>Linux (x64)<br>Mac OS X (x64) | **[Nuget: Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu/)**<br><br>**[.zip, .tgz](https://aka.ms/onnxruntime-release)**<br><br>Windows (x64)<br>Linux (x64) |

#### System Requirements (pre-requisite dependencies)
* ONNX Runtime binaries in the CPU packages use OpenMP and depend on the library being available at runtime in the
system.
* For Windows, **OpenMP** support comes as part of VC runtime. It is also available as redist packages:
[vc_redist.x64.exe](https://aka.ms/vs/15/release/vc_redist.x64.exe) and [vc_redist.x86.exe](https://aka.ms/vs/15/release/vc_redist.x86.exe)
* For Linux, the system must have **libgomp.so.1** which can be installed using `apt-get install libgomp1`.
* GPU builds require the **CUDA 10.0 and cuDNN 7.3** runtime libraries being installed on the system. Older releases used 9.1/7.1 - please refer to [release notes](https://github.com/microsoft/onnxruntime/releases) for more details.
* Python binaries are compatible with **Python 3.5-3.7**. See [Python Dev Notes](https://github.com/microsoft/onnxruntime/blob/master/docs/Python_Dev_Notes.md)
* GPU builds require CUDA runtime libraries being installed on the system:
* Version: **CUDA 10.0** and **cuDNN 7.3**
* Linux Python packages require **CUDA 10.1** and **cuDNN 7.6**
* Older ONNX Runtime releases: used **CUDA 9.1** and **cuDNN 7.1** - please refer to [prior release notes](https://github.com/microsoft/onnxruntime/releases) for more details.
* Python binaries are compatible with **Python 3.5-3.7**. See [Python Dev Notes](https://github.com/microsoft/onnxruntime/blob/master/docs/Python_Dev_Notes.md). If using `pip` to be download the Python binaries, run `pip install --upgrade pip` prior to downloading.
* Certain operators makes use of system locales. Installation of the **English language package** and configuring `en_US.UTF-8 locale` is required.
* For Ubuntu install [language-pack-en package](https://packages.ubuntu.com/search?keywords=language-pack-en)
* Run the following commands:
`locale-gen en_US.UTF-8`
`update-locale LANG=en_US.UTF-8`
* Follow similar procedure to configure other locales on other platforms.

## Building from Source
If additional build flavors are needed, please find instructions on building from source at [Build ONNX Runtime](BUILD.md). For production scenarios, it's strongly recommended to build from an [official release branch](https://github.com/microsoft/onnxruntime/releases).

Dockerfiles are available [here](https://github.com/microsoft/onnxruntime/tree/faxu-doc-updates/tools/ci_build/github/linux/docker) to help you get started.

***
# Usage

## Getting ONNX Models
* The [ONNX Model Zoo](https://github.com/onnx/models) has popular ready-to-use pre-trained models.
* To export or convert a trained ONNX model trained from various frameworks, see [ONNX Tutorials](https://github.com/onnx/tutorials). Versioning comptability information can be found under [Versioning](docs/Versioning.md#tool-compatibility)
Expand All @@ -115,8 +129,12 @@ ONNX Runtime can be deployed to the cloud for model inferencing using [Azure Mac

**ONNX Runtime Server (beta)** is a hosted application for serving ONNX models using ONNX Runtime, providing a REST API for prediction. Usage details can be found [here](https://github.com/microsoft/onnxruntime/blob/master/docs/ONNX_Runtime_Server_Usage.md), and image installation instructions are [here](https://github.com/microsoft/onnxruntime/tree/master/dockerfiles#onnx-runtime-server-preview).

## Examples and Tutorials
### Python
## Performance Tuning
ONNX Runtime is open and extensible, supporting a broad set of configurations and execution providers for model acceleration. For performance tuning guidance, please see [this page](https://github.com/microsoft/onnxruntime/blob/master/docs/ONNX_Runtime_Perf_Tuning.md).

***
# Examples and Tutorials
## Python
* [Basic Inferencing Sample](https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/inference_demos/simple_onnxruntime_inference.ipynb)
* [Inferencing (Resnet50)](https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/inference_demos/resnet50_modelzoo_onnxruntime_inference.ipynb)
* [Inferencing samples](https://github.com/onnx/onnx-docker/tree/master/onnx-ecosystem/inference_demos) using [ONNX-Ecosystem Docker image](https://github.com/onnx/onnx-docker/tree/master/onnx-ecosystem)
Expand All @@ -127,21 +145,29 @@ ONNX Runtime can be deployed to the cloud for model inferencing using [Azure Mac


**Deployment with AzureML**
* Inferencing: [Inferencing Facial Expression Recognition](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-facial-expression-recognition-deploy.ipynb), [Inferencing MNIST Handwritten Digits](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-mnist-deploy.ipynb), [ Resnet50 Image Classification](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-modelzoo-aml-deploy-resnet50.ipynb), [TinyYolo](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-convert-aml-deploy-tinyyolo.ipynb)
* [Train and Inference MNIST from Pytorch](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-train-pytorch-aml-deploy-mnist.ipynb)
* [FER+ on Azure Kubernetes Service with TensorRT](https://github.com/microsoft/onnxruntime/blob/master/docs/python/notebooks/onnx-inference-byoc-gpu-cpu-aks.ipynb)


### C#
* Inferencing using [ONNX Model Zoo](https://github.com/onnx/models) models:
* [Facial Expression Recognition](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-facial-expression-recognition-deploy.ipynb)
* [MNIST Handwritten Digits](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-mnist-deploy.ipynb)
* [Resnet50 Image Classification](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-modelzoo-aml-deploy-resnet50.ipynb)
* Convert existing model for Inferencing:
* [TinyYolo](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-convert-aml-deploy-tinyyolo.ipynb)
* Train a model with PyTorch and Inferencing:
* [MNIST](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-train-pytorch-aml-deploy-mnist.ipynb)

* Inferencing with TensorRT Execution Provider on GPU (AKS)
* [FER+](https://github.com/microsoft/onnxruntime/blob/master/docs/python/notebooks/onnx-inference-byoc-gpu-cpu-aks.ipynb)


## C#
* [Inferencing Tutorial](https://github.com/microsoft/onnxruntime/blob/master/docs/CSharp_API.md#getting-started)


### C/C++
## C/C++
* [Basic Inferencing (SqueezeNet) - C](https://github.com/microsoft/onnxruntime/blob/master/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/C_Api_Sample.cpp)
* [Basic Inferencing (SqueezeNet) - C++](https://github.com/microsoft/onnxruntime/blob/master/csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/CXX_Api_Sample.cpp)
* [Inferencing (MNIST) - C++](https://github.com/microsoft/onnxruntime/tree/master/samples/c_cxx/MNIST)


***
# Technical Design Details
* [High level architectural design](docs/HighLevelDesign.md)
* [Versioning](docs/Versioning.md)
Expand All @@ -153,6 +179,7 @@ ONNX Runtime can be deployed to the cloud for model inferencing using [Azure Mac
transform](include/onnxruntime/core/optimizer/graph_transformer.h)
* [Add a new rewrite rule](include/onnxruntime/core/optimizer/rewrite_rule.h)

***
# Contribute
We welcome contributions! Please see the [contribution guidelines](CONTRIBUTING.md).

Expand All @@ -163,6 +190,6 @@ For any feedback or to report a bug, please file a [GitHub Issue](https://github
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

***
# License
[MIT License](LICENSE)
2 changes: 1 addition & 1 deletion cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"component":{
"type":"git",
"git": {
"commitHash": "65b8e0f9979fbade16e3becbdfa69c0764946f72",
"commitHash": "7d90796473295ca3cdf976ed772215c5980ad3e0",
"repositoryUrl": "https://github.com/onnx/onnx.git"
}
}
Expand Down
26 changes: 19 additions & 7 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ option(onnxruntime_USE_OPENVINO "Build with OpenVINO support" OFF)
option(onnxruntime_USE_NSYNC "Build with NSYNC support. This option only takes effect on Linux" OFF)
option(onnxruntime_USE_EIGEN_FOR_BLAS "Use eign for blas" ON)
option(onnxruntime_USE_NNAPI "Build with DNNLibrary for Android NNAPI support" OFF)
option(onnxruntime_USE_MLAS "Use optimized blas library for GEMM and 2D Convolution" ON)
option(onnxruntime_USE_MKLDNN "Build with MKL-DNN support" OFF)
option(onnxruntime_USE_MKLML "Build MKL-DNN with MKL-ML binary dependency" OFF)
option(onnxruntime_USE_GEMMLOWP "Build with gemmlowp for quantized gemm" OFF)
option(onnxruntime_USE_AUTOML "Build AutoML support" ON)
option(onnxruntime_USE_NGRAPH "Build with nGraph support" OFF)
option(onnxruntime_USE_OPENBLAS "Use openblas" OFF)
option(onnxruntime_DEV_MODE "Enable developer warnings and treat most of them as error." OFF)
Expand Down Expand Up @@ -349,8 +350,13 @@ if (onnxruntime_USE_TVM)
add_definitions(-DUSE_TVM)

set(onnxruntime_tvm_libs onnxruntime_codegen_tvm)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES tvm nnvm_compiler)

# needs to link with stdc++fs in Linux
if(UNIX)
if (NOT APPLE)
set(FS_STDLIB stdc++fs)
endif()
endif()
list(APPEND onnxruntime_EXTERNAL_LIBRARIES tvm nnvm_compiler ${FS_STDLIB})
list(APPEND onnxruntime_EXTERNAL_DEPENDENCIES tvm nnvm_compiler)
endif()

Expand All @@ -367,10 +373,6 @@ if (onnxruntime_RUN_ONNX_TESTS)
add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS)
endif()

if (onnxruntime_USE_MLAS)
add_definitions(-DUSE_MLAS)
endif()

#Adjust warning flags
if (WIN32)
add_definitions(-DPLATFORM_WINDOWS -DNOGDI -DNOMINMAX -D_USE_MATH_DEFINES)
Expand Down Expand Up @@ -476,6 +478,10 @@ if (onnxruntime_USE_MKLDNN OR onnxruntime_USE_MKLML)
include(mkldnn)
endif()

if(onnxruntime_USE_GEMMLOWP)
add_definitions(-DUSE_GEMMLOWP=1)
endif()

if (onnxruntime_USE_MKLML)
add_definitions(-DUSE_MKLML=1 -DUSE_MKLML_FOR_BLAS=1)
if (WIN32 OR APPLE)
Expand Down Expand Up @@ -646,6 +652,12 @@ include(onnxruntime_optimizer.cmake)
include(onnxruntime_session.cmake)
include(onnxruntime_mlas.cmake)

if(onnxruntime_USE_AUTOML)
add_definitions(-DMICROSOFT_AUTOML)
# Build shared featurizer library
include(onnxruntime_automl_featurizers.cmake)
endif()

if(WIN32)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES Shlwapi)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES debug Dbghelp)
Expand Down
10 changes: 6 additions & 4 deletions cmake/external/mkldnn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if(WIN32)
set(MKLDNN_SHARED_LIB mkldnn.dll)
set(MKLDNN_IMPORT_LIB mkldnn.lib)
if(onnxruntime_USE_MKLML)
# Windows-only updated MKLML binary which contains fix for thread cleanup hang.
set(MKLML_VERSION 2020.0.20190813)
set(MKLML_SHARED_LIB mklml.dll)
set(MKLML_IMPORT_LIB mklml.lib)
set(IOMP5MD_SHARED_LIB libiomp5md.dll)
Expand Down Expand Up @@ -59,15 +61,15 @@ if (onnxruntime_USE_MKLDNN)
set(MKLDNN_DLL_PATH ${MKLDNN_LIB_DIR}/${MKLDNN_SHARED_LIB})
endif()
set(MKLDNN_INCLUDE_DIR ${MKLDNN_INSTALL}/include)
set (MKLDNN_CMAKE_EXTRA_ARGS)
set(MKLDNN_CMAKE_EXTRA_ARGS)
set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch)
# discard prior changes due to patching in mkldnn source to unblock incremental builds.
set(MKLDNN_PATCH_DISCARD_COMMAND cd ${MKLDNN_SOURCE} && git checkout -- .)
if(NOT onnxruntime_BUILD_FOR_NATIVE_MACHINE)
# pre-v1.0
list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DARCH_OPT_FLAGS=")
# v1.0
list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DMKLDNN_ARCH_OPT_FLAGS=")
set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch)
# discard prior changes due to patching in mkldnn source to unblock incremental builds.
set(MKLDNN_PATCH_DISCARD_COMMAND cd ${MKLDNN_SOURCE} && git checkout -- .)
endif()
ExternalProject_Add(project_mkldnn
PREFIX mkl-dnn
Expand Down
Loading