Releases: microsoft/onnxruntime
ONNX Runtime v1.7.0
Announcements
Starting from this release, all ONNX Runtime CPU packages are now built without OpenMP. A version with OpenMP is available on Nuget (Microsoft.ML.OnnxRuntime.OpenMP) and PyPi (onnxruntime-openmp). Please report any issues in GH Issues.
Note: The 1.7.0 GPU package is uploaded on this Azure DevOps Feed due to the size limit on Nuget.org. Please use 1.7.1 for the GPU package through Nuget.
Key Feature Updates
General
- Mobile
- Custom operators now supported in the ONNX Runtime Mobile build
- Added ability to reduce types supported by operator kernels to only the types required by the models
- Expect a 25-33% reduction in binary size contribution from the kernel implementations. Reduction is model dependent, but testing with common models like Mobilenet v2, SSD Mobilenet and Mobilebert achieved reductions in this range.
- Custom op support for dynamic input
- MKLML/openblas/jemalloc build configs removed
- Removed dependency on gemmlowp
- [Experimental] Audio Operators
- Fourier Transforms (DFT, IDFT, STFT), Windowing Functions (Hann, Hamming, Blackman), and a MelWeightMatrix operator in "com.microsoft.experimental” domain
- Buildable using ms_experimental build flag (included in Microsoft.AI.MachineLearning NuGet package)
Performance
- Quantization
- Quantization tool now supports quantization of models in QDQ (QuantizeLinear-DequantizeLinear) format
- Depthwise Conv quantization performance improvement
- Quantization support added for Pad, Split and MaxPool for channel last
- QuantizeLinear performance improvement on AVX512
- Optimization: Fusion for Conv + Mul/Add
- Transformers
- Longformer Attention CUDA kernel memory footprint reduction
- Einsum Float16 CUDA kernel for ALBERT and XLNet
- Python optimizer tool now supports fusion for BART
- CPU profiling tool for transformers models
APIs and Packages
- Python 3.8 and 3.9 support added for all platforms, removed support for 3.5
- ARM32/64 Windows builds are now included in the CPU Nuget and zip packages
- WinML
- .NET5 support - will work with .NET5 Standard 2.0 Projections
- Image descriptors expose NominalPixelRange properties
- Native support added for additional pixel ranges [0..1] and [-1..1] in image models.
- A new property is added to the ImageFeatureDescriptor runtimeclass to expose the ImageNominalPixelRange property in ImageFeatureDescriptor. Other similar properties exposed are the image’s BitmapPixelFormat and BitmapAlphaMode.
- Bug fixes and performance improvements, including #6249
- [Experimental] Model Building API available under the Microsoft.AI.MachineLearning.Experimental namespace. (included in Microsoft.AI.MachineLearning NuGet package)
- Can be used to create dynamic models on the fly to enable engine-optimized and hardware accelerated dynamic tensor featurization code sample
Execution Providers
- CUDA EP
- Official GPU build now built with CUDA 11
- OpenVINO EP
- Support for OpenVINO 2021.2
- Deprecated support for OpenVINO 2020.2
- Support for OpenVINO EP options in onnxruntime_perf_test tool
- General fixes
- TensorRT EP
- Support for TensorRT 7.2
- General fixes and perf improvements
- DirectML EP
- Support for DirectML 1.4.2
- DirectML PIX markers added to enable profiling graph at operator level.
- NNAPI EP
- Performance improvement for quantized models
- Support of per-channel quantization for QlinearConv
- Additional operator support – Min/Max/Pow
Contributions
Contributors to ONNX Runtime include members across teams at Microsoft, along with our community members:
edgchen1, snnn, skottmckay, gwang-msft, hariharans29, tianleiwu, xadupre, yufenglee, ryanlai2, wangyems, suffiank, liqunfu, orilevari, baijumeswani, weixingzhang, pranavsharma, RandySheriffH, ashbhandare, oliviajain, smk2007, tracysh, stevenlix, fs-eire, Craigacp, faxu, mrry, codemzs, chilo-ms, jcwchen, zhanghuanrong, SherlockNoMad, iK1D, askhade, zhangxiang1993, yuslepukhin, tlh20, MaajidKhan, wschin, smkarlap, wenbingl, pengwa, duli2012, natke, alberto-magni, Tixxx, HectorSVC, jingyanwangms, jstoecker, kit1980, suryasidd, RandyShuai, sfatimar, jywu-msft, liuziyue, mosdav, thiagocrepaldi, souptc, fdwr
ONNX Runtime v1.6.0
Announcements
- OpenMP will be disabled in future official builds (build option will still be available). A NoOpenMP version of ONNX Runtime is now available with this release on Nuget and PyPi for C/C++/C#/Python users.
- In the next release, MKL-ML, openblas, and jemallac build options will be removed, and the Microsoft.ML.OnnxRuntime.MKLML Nuget package will no longer be published. Users of MKL-ML are recommended to use the Intel EPs. If you are using these options and identify issues switching to an alternative build, please file an issue with details.
Key Feature Updates
General
- ONNX 1.8 support / opset 13
- New contrib ops: BiasSoftmax, MatMulIntegerToFloat, QLinearSigmoid, Trilu
- ORT Mobile now compatible with NNAPI for accelerating model execution on Android devices
- Build support for Mac with Apple Silicon (CPU only)
- New dependency: flatbuffers
- Support for loading sparse tensor initializers in pruned models
- Support for setting the execution priority of a node
- Support for selection of cuDNN conv algorithms
- BERT Model profiling tool
Performance
- New session option to disable denormal floating numbers on sse3 supporting CPUs
- Eliminates unexpected performance degradation due to denormals without needing to retrain the model
- Option to share initializers between sessions to improve memory utilization
- Useful when several models that use the same set of initializers except the last few layers of the model are loaded in the same process
- Eliminates wasteful memory usage when every model (session) creates a separate instance of the same initializer
- Exposed by the AddInitializer API
- Transformer model optimizations
- Longformer: LongformerAttention CUDA operator added
- Support for BERT models exported from Tensorflow with 1 or 2 inputs
- Python optimizer supports additional models: openai-GPT, ALBERT and FlauBERT
- Quantization
- Support of per-channel QuantizeLinear and DeQuantizeLinear
- Support of LSTM quantization
- Quantization performance improvement on ARM
- CNN quantization perf optimizations, including u8s8 support and NHWC transformer in QLinearConv
- ThreadPool
- Use
_mm_pause()
for spin loop to improve performance and power consumption
- Use
APIs and Packages
- Python - I/O Binding enhancements
- Usage Documentation (OrtValue and IOBinding sections)
- Python binding for the
OrtValue
data structure- An interface is exposed to allocate memory on a CUDA-supported device and define the contents of this memory. No longer need to use allocators provided by other libraries to allocate and manage CUDA memory to be used with ORT.
- Allows consuming ORT allocated device memory as an
OrtValue
(check Scenario 4 in the IOBinding section of the documentation for an example)
OrtValue
instances can be used to bind inputs/outputs. This is in addition to existing interfaces that allows binding a piece of memory directly/using numpy arrays that can be bound and may be particularly useful when binding ORT allocated device memory.
- C# - float16 and bfloat16 support
- Windows ML
- NuGet package now supports UWP applications targeting Windows Store deployment for both CPU and GPU
- Minor API Improvements:
- Able to bind IIterable as inputs and outputs
- Able to create Tensor* via multiple buffers
- WindowsAI Redist now includes a statically linked C-Runtime package for additional deployment options
Execution Providers
- DNNL EP Updates
- DNNL updated from 1.1.1 to 1.7
- NNAPI EP Updates
- Support for CNN models
- Additional operator support - Resize/Flatten/Clip
- TensorRT EP Updates
- Int8 quantization support (experimental)
- Engine cache refactoring and improvements
- General fixes and performance improvements
- OpenVINO EP Updates
- OpenVINO 2021.1 support
- OpenVINO EP builds as shared library
- Multi-threaded inferencing support
- fp16 input type support
- Multi-device plugin support
- Hetero plugin support
- Enable build on ARM64
- DirectML EP Updates (1.3.0 -> 1.4.0)
- Utilizing the first public standalone release of the DirectML API through the DirectML NuGet package release
- General fixes and improvements
- nGraph EP is removed. Recommend to use OpenVINO instead
Additional notes
- VCRuntime2019 with OpenMP: pinning a process to NUMA node 1 forces the execution to be single threaded. Fix is in progress in VC++.
- Workaround: place the VS2017 vcomp DLL side-by-side so that ORT uses the VS2017 version
- Pip version >=20.3 is required for use on macOS Big Sur (11.x)
- The destructor of OrtEnv is now non-trivial and may do DLL unloading Do not call
ReleaseEnv
from DLLMain or put OrtEnv in global variables. It is not safe to call FreeLibrary from DllMain. - reference - Some unit tests fail on Pascal GPUs. See: #5914
- If using the default CPU package (built with OpenMP), consider tuning the OpenMP settings to improve performance. By default the number of threads to use for openmp parallel regions is set to the number of logical CPUs. This may not be optimal for machines with hyper-threading; when CPUs are oversubscribed the 99-percentile latency could be 10x greater. Setting the OMP_NUM_THREADS environment variable to the number of physical cores is a good starting point. As noted in Announcements, future official builds of ORT will be published without OpenMP
Contributions
Contributors to ONNX Runtime include members across teams at Microsoft, along with our community members:
gwang-msft, snnn, skottmckay, edgchen1, hariharans29, wangyems, yufenglee, yuslepukhin, tianleiwu, SherlockNoMad, tracysh, ryanlai2, askhade, xadupre, liqunfu, RandySheriffH, jywu-msft, KeDengMS, pranavsharma, mrry, ashbhandare, iK1D, RyanUnderhill, MaajidKhan, wenbingl, kit1980, weixingzhang, tlh20, suffiank, Craigacp, smkarlap, stevenlix, zhanghuanrong, sfatimar, ytaous, tiagoshibata, fdwr, oliviajain, alberto-magni, jcwchen, mosdav, xzhu1900, wschin, codemzs, duli2012, smk2007, natke, zhijxu-MS, manashgoswami, zhangxiang1993, faxu, HectorSVC, take-cheeze, jingyanwangms, chilo-ms, YUNQIUGUO, jgbradley1, jessebenson, martinb35, Andrews548, souptc, pengwa, liuziyue, orilevari, BowenBao, thiagocrepaldi, jeffbloo
ONNX Runtime v1.5.3
ONNX Runtime v1.5.2
This is a minor patch release on 1.5.1 with the following changes:
- Remove dependency on cudnn64_7.dll for GPU C# nuget: #5386
- Add config keys header file in the packages for Linux and Mac: #5388
- Add flatbuffers verifier for ORT format buffer: #5378
- Use official flatbuffers v1.12: #5392
- Mitigate pybind11 build break using Xcode 12 on macOS: #5381
- Support trilinear sampling in the Resize operator: #5300
- Update TensorRT parser to fix accuracy issue in some opset11 models: #5442
ONNX Runtime Training RC3.1
ONNX Runtime Training RC3
ONNX Runtime v1.5.1
Key Updates
General
- Reduced Operator Kernel build allows ORT binaries to be built with only required operators in the model(s) - learn more
- [Preview] ORT for Mobile Platforms - minimizes build size for mobile and embedded devices - learn more
- Transformer model inferencing performance optimizations
- Perf improvement for DistilBERT
- Benchmark tool supports more pretrained models
- Improvements in quantization tool
- Support quantization-aware training models
- Make calibration tool to support general preprocessing and calibrate on input
- Simplify the quantization APIs
- Support of model larger than 2G
- New operators for static quantization: QLinearMul, QLinearAdd, QlinearSigmoid and QLinearLeakyRelu
- Prepack constant matrix B for float GEMM (MatMul, Attention)
- Limited Python 3.8 support added in addition to 3.5-3.7 for official Python packages. Not yet supported for Windows GPU and Linux ARM builds.
- Telemetry enabled in Java and NodeJS packages for Windows builds. Note: data is not directly sent to Microsoft or ORT teams by ONNX Runtime; enabling telemetry means trace events are collected by the Windows operating system and may be sent to the cloud based on the user's privacy settings - learn more.
API
- Python API support for RegisterCustomOpsLibrary
- IO Binding API for C/C++/C# language bindings. This allows use of pre-allocated buffers on targeted devices and also target device for unknown output shapes.
- Sharing of allocators between multiple sessions. This allows much better utilization of memory by not creating a separate arena for each session in the same process. See this for details.
Windows ML
- NuGet package now supports UWP applications targeting Windows Store deployment (CPU only)
- NuGet package now supports .NET and .NET framework applications
- RUST Developers can now deploy Windows ML – sample and documentation available here
- New APIs to for additional performance control:
- IntraopNumThreads: Provides an ability to change the number of threads used in the threadpool for Intra Operator Execution for CPU operators through LearningModelSessionOptions.
- SetNamedDimensionOverrides: Provides the ability to override named input dimensions to concrete values through LearningModelSessionOptions in order to achieve better runtime performance.
- Support for additional ONNX format image type denotations – Gray8, normalized [0..1] and normalized [-1..1]
- Reduced Windows ML package size by separating debug symbols into separate distribution package.
Execution Providers
- CUDA updates
- CUDA 10.2 / cuDNN 8.0 in official package
- CUDA 11 support added and available to build from source
- CUDA conv kernel support asymmetrical padding to fully support models such as YoloV3 for improved GPU perf
- TensorRT EP updates
- Support for TensorRT 7.1
- Added TensorRT engine caching feature, turned on by setting env variable ORT_TENSORRT_ENGINE_CACHE_ENABLE=1
- TensorRT builds are now built with the Execution Provider as a separate dll. If enabled in the build, the provider will be available as a shared library. This was previously also enabled for the DNNL EP (ORT 1.3). Other Execution Providers will be added in the future.
- OpenVINO EP updates
- Support for OpenVINO 2020.4
- Added runtime options for VPU hardware to select specific hardware device and enable fast compilation of models.
- Enable C# binding support for OpenVINO EP
- DirectML EP updates
- API available for Python (build from source) and C# Microsoft.ML.OnnxRuntime.DirectML
- 7 new operators for ONNX 1.7 (opset 12): Celu, GreaterOrEqual, LessOrEqual, ArgMin/Max with select_last_index, GatherND with batch_dim, RoiAlign
- New data integer types were added to existing operators: Clip int, Max int, Min int, MaxPool int8, ReduceMin int8, ReduceMax int8, Pow int exponent
- Higher dimension support 1D to 8D added to these operators: ElementWise*, Activation*, Reduce*, ArgMin/ArgMax, Gather*, Scatter*, OneHot
- 64-bit support for indices on GPU's that support it: Gather, Scatter, OneHot, ArgMax/ArgMin, Cast.
- Android NNAPI EP updates:
- Support for dynamic input shape
- Int32/float32/uint8 data type
- 50% more supported operators (36 total)
- Support for Uint8 static quantization
- Smaller binary size
- Lower memory consumption
- CPU fallback for Android level 26-
- MiGraphX EP updates
- Added ONNX operators: GatherElements, NonZero, Equal, and Where
- Support for Boolean data type
- Improve support for existing operators:
- Asymmetric padding of AveragePool
- Multi-dimensional support for Convolution, Pooling, LRN, and Batchnormalization
- Ceil mode support for AveragePool and MaxPool
- More general approach to check whether constant folding is possible
- Improved graph partitioning logic
Training (RC3 release)
- New and improved API to simplify integration with PyTorch trainer code - see instructions here
- Updated CUDA 11 / cuDNN 8.0 support to accelerate in NVIDIA A100
Dependency updates
MacOS binaries now rely on openmp to be installed. See this for reference.
Contributions
Contributors to ONNX Runtime include members across teams at Microsoft, along with our community members:
gwang-msft, snnn, skottmckay, hariharans29, thiagocrepaldi, tianleiwu, wangyems, RandySheriffH, yufenglee, SherlockNoMad, smk2007, jywu-msft, liqunfu, edgchen1, yuslepukhin, tiagoshibata, fdwr, ashbhandare, iK1D, wschin, BowenBao, zhanghuanrong, RyanUnderhill, ryanlai2, askhade, pranavsharma, martinb35, suffiank, ytaous, KeDengMS, rayankrish, natke, YUNQIUGUO, range4life, smkarlap, zhangxiang1993, xzhu1900, codemzs, weixingzhang, stevenlix, tracysh, mosdav, jingyanwangms, tlh20, souptc, orilevari, kit1980, yangchen-MS, faxu, fs-eire, wenbingl, chilo-ms, xkszltl, Andrews548, yuzawa-san, MaximKalininMS, jgbradley1, nickfeeney, zhijxu-MS, Tixxx, suryasidd, Craigacp, duli2012, jeffbloo
ORTTraining RC2
orttraining_rc2 For ORTTraining RC2 release to include hotfix https://github.com/micr…
ONNX Runtime v1.4.0
Key Updates
- Performance optimizations for Transformer models
- GPT2 - Enable optimizations for Attention with Past State and Attention Mask
- BERT - Improve EmbedLayerNormalization fusion coverage
- Quantization updates
- Added new quantization operators: QLinearAdd, QAttention
- Improved quantization performance for transformer based models on CPU
- More graph fusion
- Further optimization in MLAS kernel
- Introduced pre-packing for constant Matrix B of DynamicQuantizeMatMul and Qattention
- New Python IOBinding APIs (bind_cpu_input, bind_output, copy_outputs_to_cpu) allow easier benchmarking
- Users no longer need to allocate inputs and outputs on non-CPU devices using third-party allocators.
- Users no longer need to copy inputs to non-CPU devices; ORT handles the copy.
- Users can now use copy_outputs_to_cpu to copy outputs from non-CPU devices to CPU for verification.
- CUDA support for Einsum (opset12)
- ONNX Runtime Training updates
- Opset 12 support
- New sample for training experiment using Huggingface GPT-2.
- Upgraded docker image built from the latest PyTorch release
- Telemetry is now enabled by default for Python packages and Github release zip files (C API); see more details on what/how telemetry is collected in ORT
- [Coming soon] Availability of Python package for ONNX Runtime 1.4 for Jetpack 4.4
Execution Providers
New Execution Providers available for preview:
- [Preview] AMD MIGraphX
- [Preview] ARM NN
Contributions
Contributors to ONNX Runtime include members across teams at Microsoft, along with our community members:
snnn, tianleiwu, edgchen1, hariharans29, skottmckay, tracysh, yufenglee, fs-eire, codemzs, tiagoshibata, yuslepukhin, gwang-msft, wschin, smk2007, prabhat00155, liuziyue, liqunfu, ytaous, iK1D, BowenBao, askhade, pranavsharma, faxu, jywu-msft, ryanlai2, xzhu1900, KeDengMS, tlh20, smkarlap, weixingzhang, jeffbloo, RyanUnderhill, mrry, jgbradley1, stevenlix, zhanghuanrong, suffiank, Andrews548, pengwa, SherlockNoMad, orilevari, duli2012, yangchen-MS, yan12125, jornt-xilinx, ashbhandare, neginraoof, Tixxx, thiagocrepaldi, Craigacp, mayeut, chilo-ms, prasanthpul, martinb35, manashgoswami, zhangxiang1993, suryasidd, wangyems, kit1980, RandySheriffH, fdwr
ONNX Runtime v1.3.1
This update includes changes to support the published packages for the Java and nodejs APIs for the 1.3.0 release.
- Maven: Java API CPU
- Maven: Java API GPU
- NPM: ONNX Runtime Node.js API
For all other APIs/builds, the 1.3.0 release packages are suggested. 1.3.1 does address the 1.3.0 issue of Crash when setting IntraOpNumThreads using the C/C++/C# API, so if this fix is needed it can be built from source using this release branch (with official release support).