Commit graph

3809 commits

Author SHA1 Message Date
Hariharan Seshadri
d46dbeafd3
Expose knobs to create and share (CPU) allocators across sessions in C# and Python (#5634) 2020-11-21 14:12:33 -08:00
Guoyu Wang
26e6ced172
Temporary fix for Android CI failure (#5889)
* Unblock the Android CI

* Add python to android ci's command
2020-11-21 17:58:32 +10:00
Tianlei Wu
910bbfe1ef
Support 3D attention mask (#5887)
Support 3D attention mask with shape (batch_size, sequence_length, all_sequence_length)
2020-11-20 22:48:01 -08:00
Guoyu Wang
cc6e8fb7cc
Filter initializers for GraphViewer with IndexedSubGraph (#5884)
* fix filtered subgraph initializer issue

* minor fix

* Inlcude implicit input of nodes to see if they are initializers

* Add test case

* minor update

* Address PR comments

* Fix some code error
2020-11-20 18:36:58 -08:00
Ryan Hill
ba739a8000
Convert OpenVINO into a shared provider (#5778)
Same as Dnnl and TensorRT before it, now with more methods and more cleanup.
2020-11-20 17:39:57 -08:00
Edward Chen
8c04ada0d0
Bump training docker image version. (#5428) 2020-11-20 16:38:09 -08:00
Olivia Jain
3738ca7e10
Improve perf testing (#5760)
* build off a specific commit and archive wheel file

* rename to fp32, prefix results w/ commit, add CPU col

* rename 99th to 90 percentile

* get symbolic_shape from master each time

* add install archive wheel, parallel build

* shortening hash
2020-11-20 16:03:09 -08:00
Scott McKay
f0142da59c
Add NNAPI to providers that can be used via the python bindings. (#5867)
Update ORT model conversion script
  - add args for specifying optimization level and whether to use NNAPI
  - add logic to create a list of required ops and ORT format model that can be used with NNAPI
2020-11-21 09:18:35 +10:00
Scott McKay
3970eb2e5d
Add documentation on enabling/using NNAPI in a minimal build (#5879)
* Add initial documentation on using NNAPI with a minimal build

* minor clarification

* Add note on avoiding local full build

* Address a couple of PR comments
2020-11-21 09:00:24 +10:00
Hariharan Seshadri
c0471240b4
Remove redundant lines of code (#5883) 2020-11-20 14:29:11 -08:00
Takeshi Watanabe
a622533ecc
Support profile_file_prefix in python binding (#5864) 2020-11-20 14:28:50 -08:00
KnightYao
5a0fdd3537
Update custom_ops.cc (#5507)
To fix KernelInfoGetAttrbute_string get string will lose the laster char
2020-11-20 14:15:22 -08:00
Dmitri Smirnov
ceedf5630b
Document all C# API pubic interfaces (#5853)
Address documentation shortcomings.
 Document all required public interfaces.
 Add pipeline configuration.
Make Doxygen lookup a env vars for paths.
2020-11-20 14:03:55 -08:00
Ye Wang
ab9d4b366b
revert 262e9ef21d (#5882)
Co-authored-by: wangye <wangye@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-11-20 13:05:53 -08:00
Edward Chen
bef06dac93
Automatically clean up build docker image cache. (#5843)
Follow up to #5811 to automate cleanup of the build docker image cache.
Added a script and build definition to clean up docker images that haven't been accessed recently.
2020-11-20 11:56:26 -08:00
Yufeng Li
6808bfefff
Extend MatMulInteger fusion (#5871)
Extend MatMulInteger fusion to MatMulIntegerToFloat or DynamicQuantizeMatMul to support scenario: Matrix B, B scale, B zero point are non constant
2020-11-20 11:30:49 -08:00
Guoyu Wang
44313970d3
Enable scalar initializer support in NNAPI (#5875)
* Add scalar initializer support in NNAPI
2020-11-20 21:40:49 +10:00
Scott McKay
00412a76e9
Exclude some training specific code from the minimal build. Cleanup some related aspects of allocation planner. (#5861)
* Exclude some training specific code around the allocation planning and initializer handling from the minimal build.
Simplify the code around tracking start/end usage of a value.
2020-11-20 20:25:46 +10:00
Maajid khan
b057b3d36e
Enabled fp16 for input types (#5878)
Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2020-11-20 00:19:49 -08:00
stevenlix
1068f3eb87
Use flatbuffers for INT8 calibration table (de)serialization in TensorRT EP (#5873)
* add int8

* support both native TRT cal table and ORT cal table

* add more comments

* Update env variable name and check platform availability for int8/fp16

* add backward compatibility on old env var ORT_TENSORRT_ENGINE_CACHE_PATH and switch to flatbuffers for ort cal table deserialization
2020-11-19 21:41:12 -08:00
Hector Li
fd6e7d9c5c
Fix the arm64 build issue on some special OS for OpenVino (#5870)
CMAKE_LIBRARY_ARCHITECTURE returns empty from some OS
2020-11-19 21:13:02 -08:00
stevenlix
dfea92925c
Add calibration based INT8 quantization to TensorRT EP (#5842)
* add int8

* support both native TRT cal table and ORT cal table

* add more comments

* Update env variable name and check platform availability for int8/fp16
2020-11-19 17:10:49 -08:00
S. Manohar Karlapalem
ff58f621fa
Remove nGraph Execution Provider (#5858)
* Remove nGraph Execution Provider

Pursuant to nGraph deprecation notice: https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/nGraph-ExecutionProvider.md#deprecation-notice

**Deprecation Notice**

| | |
| --- | --- |
| Deprecation Begins	| June 1, 2020 |
| Removal Date |	December 1, 2020 |

Starting with the OpenVINO™ toolkit 2020.2 release, all of the features
previously available through nGraph have been merged into the OpenVINO™
toolkit. As a result, all the features previously available through
ONNX RT Execution Provider for nGraph have been merged with ONNX RT
Execution Provider for OpenVINO™ toolkit.

Therefore, ONNX RT Execution Provider for **nGraph** will be deprecated
starting June 1, 2020 and will be completely removed on December 1,
2020. Users are recommended to migrate to the ONNX RT Execution Provider
for OpenVINO™ toolkit as the unified solution for all AI inferencing on
Intel® hardware.

* Remove nGraph Licence info from ThirdPartyNotices.txt

* Use simple Test.Run() for tests without EP exclusions

To be consistent with rest of test code.

* Remove nGraph EP functions from Java code
2020-11-19 16:47:55 -08:00
Guoyu Wang
261462be0d
Change NNAPI runtime options to use uint32_t (#5863)
* Change nnapi options unsigned long -> uint32_t

* Move options from long to int in java code
2020-11-19 13:38:49 -08:00
RandySheriffH
4bb41d610b
Address scalar expand to scalar case (#5854)
* address scalar expand to scalar case

* remove tensorrt unsupported type

* exclude tensorrt from scalar to scalar case

Co-authored-by: Randy Shuai <rashuai@microsoft.com>
2020-11-19 11:25:53 -08:00
Guoyu Wang
e485805b8d
[NNAPI EP] Add infrastructure for Op Reduction (#5841)
* init op_builder change

* Add reduce ops support for OpSupportChecker

* minor update

* Address CR comments

* Add scripts to exclude ops for NNAPI EP

* Fix the long string error in python script

* Remove extra debug print in the script

* Remove the op reduction scripts from this CR

* Remove unused FindOpBuilder functions

* Move CreateSharedOpBuilder to shared helper function
2020-11-19 11:25:34 -08:00
Hariharan Seshadri
62508ef0e4
Revert "Remove MKLML build config (#5559)" (#5855) 2020-11-19 10:53:08 -08:00
Changming Sun
26db396b4b
Reduce the number of CI build variants (#5856) 2020-11-18 20:41:30 -08:00
Vincent Wang
47185b9513
reducealll2 cpu kernel (#5833)
Co-authored-by: Vincent Wang <weicwang@AiFramework2080ti2.corp.microsoft.com>
2020-11-19 10:20:05 +08:00
Suffian Khan
7196d4206f
Adding Transpose3d and Transpose4d special case kernels for Rocm (#5837)
* add transpose3d; seeing memory fault on rocm3.7

* cleaned up code; commit to switch machines

* tested working on gcr-openpai-35; 168 ex/sec

* remove debug HCC_ENABLE_PRINTF
2020-11-18 17:47:19 -08:00
satyajandhyala
b495ae8103
ORT fuzz testing (#5771)
* Added fuzz testing using ORT model.

* The onnxruntime_security_fuzz driver code should accept either ONNX or ORT (based on the file extension) input file if /f flag is provided.

*  Added ValidateOrtFormatModelDoesNotRunOptimizersInFullBuild test.

* Added win-ci-fuzz-testing.yml to run build pipeline.

* Prevent out-of-range access in the graph.cpp.
2020-11-18 16:07:36 -08:00
Sheil Kumar
84c1340f9b
Refactor implementation of Tensor<T> and underlying buffer stores to improve binary size and maintainability (#5836)
* refactor tensor buffers to make cleaner

* refactor to make tensor backing buffer implementation smaller and cleaner

* missed virtual on destructor

* remove unnecessary static_pointer_cast

* add string vector accessor

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-11-18 14:56:47 -08:00
Changming Sun
85f945a875
Regenerate CI build docker images (#5850) 2020-11-18 14:36:59 -08:00
Yufeng Li
6f86c4dbe3
Quantize LSTM (#5595)
Quantize LSTM:
1. dynamically quantizes MatMul inside the LSTM. It doesn't quantize activation function.
2. support per-channel on the input weight and recurrent weight.
2020-11-18 11:21:49 -08:00
Pranav Sharma
c2a993e745
Add documentation for OrtArenaCfg for CreateAndRegisterAllocator API. (#5831)
* Add documentation for OrtArenaCfg for CreateAndRegisterAllocator API.

* Address PR comments

* More comments
2020-11-18 10:21:20 -08:00
Scott McKay
b3a6ed14d4
Prevent saving a model containing fused nodes as we don't have any way to save the compiled kernels so the saved model will be invalid. (#5840) 2020-11-18 16:17:07 +10:00
Peichen Xie
e8c0f5d0ff
Update the quantization script to support GEMM (transB==1) (#5432)
* Modify onnx_quantizer.py

* Fix topology order issues

* Handle more cases
2020-11-17 21:24:48 -08:00
Tracy Sharpe
f964bb94ba
Add QLinearConv NHWC transformer (#5824)
The implementation of QLinearConv internally does a transpose(NHWC)->im2col+GEMM->transpose(NCHW). This adds a graph transformer to change a model to use a com.microsoft.QLinearConv that supports NHWC natively to avoid unnecessary transposes.
2020-11-17 20:51:02 -08:00
RandySheriffH
e814c9307a
Boost Expand cpu operator by multi-threading (#5739)
* implement multi-threading expand on cpu

* format code

* move expand op

* add test case

* format code

* optimize code

* fix comments

* handle empty tensor

* sync with master

* add ParallelSection

* add threshold for multi-threading

Co-authored-by: RandySheriffH <rashuai@microsoft.com>
2020-11-17 20:27:24 -08:00
Edward Chen
71e7c2b423
Cache build docker images in container registry. (#5811)
This PR adds infrastructure to automatically cache docker images used in CI builds in a container registry.

Currently, build images are pulled from a container registry for some builds and built every time for others. The container registry requires maintenance to keep the images up to date and building images every time wastes build agent resources.

With this change, a given build image can be looked up in a cache container registry and if present, pulled, and otherwise, built and pushed. The uniqueness of a build image is determined by a hash digest of the dockerfile, docker build context directory, and certain "docker build" options. This digest is part of the image tag in the cache container repository.

The cache container registry will need to be cleaned up periodically. This is not automated yet.
2020-11-17 17:02:24 -08:00
Guoyu Wang
252dbf1182
fix build break (#5835) 2020-11-17 16:08:10 -08:00
Du Li
3b5ba1cf7e
Parallelizing Resize op (#5792)
* adding parallelization for resize bi-linear mode.

* Adding parallelization for resize op.

* Use TrySimpleParallelFor instead of TryParallelFor.
TryParallelFor has unaddressed issue with cost model.

* Addressing PR comments.
2020-11-17 13:59:18 -08:00
Justin Stoecker
bd236ecc26
Switch to unified DirectML 1.4.0 redistributable (#5794)
Transitions from the ORT-only DML NuGet (hosted on the onnxruntime_public feed) to the new unified DirectML NuGet (Microsoft.AI.DirectML) on nuget.org. In addition, the Microsoft.AI.MachineLearning (WinML) and Microsoft.ML.OnnxRuntime.DirectML packages now take a dependency on the Microsoft.AI.DirectML package. This means we can remove the extra copy of DML binaries in these packages since they will be installed by the DML package.
2020-11-17 13:42:23 -08:00
Scott McKay
c84bc25e28
Add validation of op registrations (#5817)
* Add validation of operator registrations to the reduction script
  - the script has all the logic to process the registrations, and there's a CI that uses it

Fix some operator registrations

* Fix CUDA PRelu registration

* Refactor to split out kernel registration file parsing and use in the exclude ops script and an op registration validation script.
Run op validation in minimal build CI

* Fix PEP8 error and some comments
2020-11-17 10:44:09 -08:00
Sherlock
241b2226a7
Update orttraining-linux-gpu-ci-pipeline.yml for Azure Pipelines (#5826) 2020-11-17 09:27:59 -08:00
Guoyu Wang
1a66dfc0f9
Enable Squeeze Opset 13 for NNAPI (#5717)
* Add copy sparse model in minimal CI

* Add squeeze 13 support

* fix small typo

* Add ut for squeeze in NNAPI

* Fix some issue in the UT and code

* Modify based on the master change

* Fix build break
2020-11-17 00:26:06 -08:00
Scott McKay
7b76b57fc8
Support EPs that compile nodes in a minimal build. (#5776)
* Support EPs that compile nodes in a minimal build. This enables NNAPI being used.
2020-11-17 13:52:22 +10:00
Tiago Koji Castro Shibata
794e8479eb
Revert #5805 (#5823)
* Fix race condition in msbuild

* Revert "Named Dimension Override internals test and experimental API (#5805)"

This reverts commit 157d1844fb.
2020-11-16 17:05:28 -08:00
Scott McKay
a3f3a63206
Move OpenVINO specific validation function to somewhere more sensible, and rename to provide context on its usage. (#5822) 2020-11-17 10:58:43 +10:00
Dwayne Robinson
732ffd12d2
DirectML Execution Provider integration 2020-11-13 (#5809)
* Merged PR 5253310: Fix 0-sized dimension broadcasting

Tensors that contain 0-sized dimensions were being broadcasted to higher dimensions, which would remove the possibility to remove them from the graph. 0-sized dimensions represent empty tensors, so whatever operator needs to broadcast it shouldn't try to call into DML.

* Merged PR 5334334: Fix asserts and failure in GraphKernelHelper.cpp

This extends a workaround needed to match node inputs with Tensors to the EP code handling constant input upload.

This was causing issues in a couple of models, including EfficientDet, although that model still fails due to this bug:
https://microsoft.visualstudio.com/OS/_workitems/edit/29970551

Related work items: #29706035

* Merged PR 5344477: Disable GPU timeouts in DML EP command queue creation

GPU timeouts have already been disabled in command queues created by Winml, but not the ones created by the DML EP within the ORT API

* Merged PR 5380534: BatchNormalization failure in autopilot - fix output size

New validation [here](https://microsoft.visualstudio.com/DefaultCollection/WindowsAI/_git/WindowsAI/pullrequest/5354070?_a=files&path=%2Fdml%2FSharedValidation%2FDmlBatchNormalizationOperatorValidator.h) causes some BatchNorm cases to fail (e.g. OnnxConformanceTestsTaef::BatchNormalization (BatchNormalization_2x2x2)). I'm unsure how long this bug existed, but based on Nick's investigation, it apparently still worked anyway.

Related work items: #27678610

* Merged PR 5386132: Update 8D BatchNorm

Update 8D BatchNorm

Related work items: #27678610

* Merged PR 5390213: Tile allow 0 in repeats

0 is valid in Tile in "repeats" parameter. The CPU kernel handles it fine. So should the DML EP.

Related work items: #29970551

Co-authored-by: Justin Stoecker
Co-authored-by: Jeff Bloomfield
Co-authored-by: Patrice Vignola
Co-authored-by: Nick Feeney
2020-11-16 15:29:08 -08:00