Commit graph

2141 commits

Author SHA1 Message Date
Tiago Koji Castro Shibata
f48b9e2ea7
Add adapter session tests (#3522)
* Start adapter tests

* Fix more adapter session CMake

* Implememt adapter session tests

* Fix adapter test breaks

* Test fixes, profiling test

* Fix adapter w/ DML tests

* Cleanup

* Fix WinML adapter profiling test

* Fix memory leaks

* Remove FIXME
2020-04-24 14:39:54 -07:00
Tianlei Wu
63e6c257e4
Disable GeluApproximation transformer by default (#3644)
Disable GeluApproximation by default
2020-04-24 14:29:40 -07:00
Ye Wang
ad8eb921d3
Changes on RollingWindow Transformer (#3679)
* changes on rollingwindow transformer

* fix linux/macos build error

* resolve comments
2020-04-24 13:00:49 -07:00
Ori Levari
66343e2fcf
use map with case insensitive hash and equals functions for learningmodel metadata. add test to verify case insensitive functionality. (#3671)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2020-04-24 10:46:10 -07:00
Ye Wang
5c7f616431
FeaturizersLibrary update and add variadic Input/Output to TimeSeriesImputer (#3674) 2020-04-24 08:53:00 -07:00
S. Manohar Karlapalem
6d4f2f5bf9
OpenVINO EP v2.0 (#3585)
* Added FP16 transformations

* Revert "Added CMAKE_BUILD_TYPE to make building dynamic"

This reverts commit d3e17af1af655cfdc4d2fec33f52055caa525e85.

* Added FP16 transformations for FP16 builds

* Backend logic cleanup

Cleans the backend(intel_graph.*) code in the following ways:-

1. Minimize global usage: Since all the IR graphs need to be
re-generated on every Infer, it is bad practice to rely on globals
for their saving and usage as there would be multiple readers and
writers to the same global variable leading to incorrect usages or
contentions. This change replaces globals with locals where possible.
 This change also fixes an existing bug with due to
incorrect global usage.

2. Remove all unused functions.

3. Remove all unused headers and prepocessor directives.

* removed commented out code

* Disabled default optimization for Intel EP

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Fix missed plugins.xml for python bindings

* Fixed the build after latest master changes

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled unsupported ops for accelerators

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added some more disabled ops

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added environment variable to enable debugging

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added more debug statements

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Fixed unsupported ops list for GPU and VPU

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Fixed unsqueeze unit tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added error message to the status

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Overwrite Model proto with shape info from data

Overwrites the shape info of Model proto with the shape from
actual input data. Needed for inferring models with Dynamic
shapes.

* Removed print statement and disabled where op

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled Reshape with Empty initializer

* Added more debug statements for 1P

* Don't allow 1D inputs with symbol for dimension

* Disabled some 3rd phase ops

* Disabled split and added zero dimension check for OutputDefs

* Cleanup zero dimensionality check

* Added different data type check for inputs and initializers

* Added conditions for Mod, Cast and Pad

* Removed unused variable

* Disabled scan and added conditions for squeeze

* Added changes for fixing all C++ unit tests

* Implements Backend Manager class for caching

Backend Manager provides a layer of indirection between EP interface
and OV backend that provides caching services for models with
symbolic dims in input shapes.

* clean up commented blocks

* clang-formatting

* Read I/O type info from ModleProto

Read the tensor element type information from ModelProto object,
as FusedNode is no longer available.

* code cleanup

* clang-formatting

* Added print statement for jenkins

* Disabled some python tests

* Changed the path of convert fp32 to fp16 hpp

* Added conditions for BatchNorm in GetCapability

* Fixed failed tests

* Revert "Added conditions for BatchNorm in GetCapability"

This reverts commit c3c28c3b00d27892c42546b35dacdd807a48ee90.

* Added Intel to onnxruntime backends

* pick up vars set by OV package setupvars.sh

* Added conditions for Identity

* remove a few cout prints

* Added conditions for GPU_FP32 unit tests

* Revert "pick up vars set by OV package setupvars.sh"

This reverts commit 8199e029c03eae21a1a7ef6bfdc93d00e5d0198b.

* Commented out fatal message for protobuf

* Might need to be removed

* Add interface class for current backend

* moved common logic to base class

* simplified cpu backend

* Removed unused headers

* use vectors to save i/o tensors for windows compatibility

* move utils fxns to backend_utils namespace

* rename ov_backend to ibackend

* Factory pattern for backend creation

* rename CPU backend to Basic backend

* renamed to vad-M and added to factory list

* Added conditions for VPU

* Added print statements

* Changed the logic for checking for symbolic shapes

* Modified logic for zero dimension check

* Removed VPU single dimension condition

* Removed comments

* Modified logic in DimensionCheck method

* Remove legacy OpenVINO EP

Remove all the legacy code for OpenVINO EP. UEP code will take its
place going forward.

This change does NOT remove OVEP files in the following areas asa
they will be reused by UEP:-
1. Documentation: All .md files
2. Docker releated files
3. Python bindings
4. Java bindings
5. C# bindings
6. ORT Server
7. CI pipeline setup files

* Rename Intel EP to OpenVINO EP

* Added unique names to the subgraphs

* Removed subgraphs with only constant inputs

* Modified subgraph partitioning algorithm to remove const input subgraphs

* Apply suggestion to onnxruntime/core/providers/openvino/openvino_execution_provider.cc

* Tracking output names to fix the output order bug

* Changed output names to a unordered map

* Modified logic to check for symbolic input shapes

* Fixed a bug in Reshape check

* Added empty model path to Model constructor

* Made necessary changes to cmake to build from the binary package

* Changed INTEL_CVSDK_DIR to INTEL_OPENVINO_DIR

* Enable dyn device selection with C++ API

* Added Round operator to unsupported list

* Modified subgraph partition logic for MYRIAD

* Removed supported ops from the list

* Enable dyn dev selection in Py API's

* Add documentation for dynamic device selection

* Use MYRIAD || HDDL instead of VPU

* Removed temporary cast of Int64 to FP32

* Disabled unit Tests for CPU_FP32 and GPU_FP32

* Removed default "CPU" from unit tests to allow overriding

* Removed ops Concat, Squeeze, Unsqueeze from unsupported list

* Get the device id from info

* Removed overwriting device_id and precision

* Enabled ConvTranspose and EyeLike

* Reordered unsupported ops in alphabetical order

* Fixed syntax error

* Fixed syntax error

* Code clean-up: Handle exceptions, logs and formatting

Code formatted according to ORT coding guidelines.

* remove debug print from pybind code

* updated docs with ops and models

* formatting prints

* Added default values for c and j for openvino

* Overriding the values set for c and j to be 1
* BACKEND_OPENVINO should be empty if openvino is not in build

* Overriding c value with default for perftest

* fix VAD-M device string bug

* Add IE error details to exceptions

* Use IE specific device names in EP

* Add VAD-F (FPGA) device support

* Removed unecessary libraries from whl package

* Code changes for Windows compatibility

* Add VAD-F option to python API

* [revert before merge] cmake changes for RC

* Enable Windows build in CMake

* Unset macro OPTIONAL for windows builds

inference_engine.hpp's include chain defines a macro 'OPTIONAL'
which conflicts with onnx project's headers when using MSVC. So
would need to explictly unset it for MSVC.

* Use a single copy of plugin/IE::Core

Defined as a static member in Backend manager

* Remove restriction of single subgraphs for  myriad

* Passed subgraph name to Backend to enhance log statements

* Disabled zero dimension conditions

* Disabled concat to remove zero dims

* Enabled building ngraph as part of ORT

* Removed serializing and added versioning

* Fix CPU_FP32 unit tests

* Removed unecessary condition

* add ngraph.so.0.0 to .whl

* Check for zero dimensions only for inputs and outputs

* Restrict loading only 10 subgraphs on myriad

* Build ngraph.dll within UEP. Doesn't link yet

* Rename Linux included libngraph.so to libovep_ngraph.so

Renames locally built libngraph.so containing ONNX importer to
libovep_ngraph.so in order to avoid linkage conflicts with
libngraph.so supplied by OpenVINO binary installer.
Applies only for Linux builds.

* use output_name cmake properties for lib name

* fix .so name format in lib_name.patch

* CMake code cleanup

* Rename WIN32 included ngraph.dll to ovep_ngraph.dll

To avoid conflict with ngraph.dll distributed by openvino.

* Added myriad config for networks without 4 dimensions

* Loading the 10 max clusters for inference on myriad

* Refactor code and add Batching support

Encapsulate subgraph settings into context structs.

Add batching support for completely supported models.

* Disabled some broken tests

* use input_indexes to avoid batch-checking initializers

* Avoid static initialization order error on WOS

* Added candy to broken tests

* InternalCI changes for 2020.2

* Updated DLDT instructions

* Unsaved changed in install_openvino.sh

* Changes after manual check

* Remove custom ngraph onnx_import build for WOS

ONNX Importer on WOS does not have protobuf issue.

* Remove FP32ToFP16 ngraph pass

This conversion is performed implicitly within IE.

* Surround debug logic by #ifndef NDEBUG

* remove invalid TODO comments

* removed references to ngrpah-ep

* clang-formatting

* remove commented code

* comment edits

* updating copyright year to that of first OpenVINO-EP release

* remove redundant log msg

* Modified operator and topology support

* Update build instructions

* doc formatting

* Fixed clip unit tests

* Revert "Remove FP32ToFP16 ngraph pass"

This reverts commit ec962ca5f315a5658ad980e740196f19de2639c1.

* Applying FP16 transformation only for GPU FP16

* Fixed GPU FP32 python tests

* automatically use full protobuf

* disable onnxrt server for now

* Disabled upsample

* update dockerfile instructions

* Removed MO paths and added ngraph path

* Remove OVEP from ORT Server docs

Will put it back in after validation

* Updated path to Ngraph lib

* Disabled Resize and some other python tests

* Removed unnecesary header files

* Use commit SHA to fetch ngraph repo

* Avoid un-needed file changes due to version update

* Fixed clip tests

* Fixed Pow, max and min onnx tests

* build.md doc typo

* Update cmake patch command for ngraph src

* remove dead cmake code for onnxruntime_USE_OPENVINO_BINARY

* use spaces instead of tab

* remove commented code

* Add info about protobuf version

* edit debug env var and enable for WIN32

* specify only version tag of 2020.2 for dockerbuilds

* remove unnecessary file changes

* Pass empty string as default argument to C# tests

* Use ${OPENVINO_VERSION} to name openvino install directory in CI builds

* Enabled unnecessarily disabled tests

* Fixed ngraph protobuf patch

* Fixed error in protobuf patch

* Revert "Use ${OPENVINO_VERSION} to name openvino install directory in CI builds"

This reverts commit 89e72adb8bf3b9712f5c81c5e13fe68c6c0df002.

* Remove unsetting OPTIONAL macro

This is no longer used in recent ONNX update onnx/onnx@da13be2,
so this unset workaround is no longer necessary.

* Use a null string  default argument for C# API

* Set OpenVINO version yml files and pass to CI Docker builds

Git Tag info for DLDT as well as install directory are set
using this value.

This reverts commit 9fa9c20348ed72ae360a95c98e9b074d2f9fafc5.

* Documentation: recommendation and instructions for disabling ORT graph optimizations

* more doc updates

* Reduced the number of models according to CI time constraints

Co-authored-by: ynimmaga <yamini.nimmagadda@intel.com>
Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
Co-authored-by: Mikhail Treskin <mikhail.treskin@intel.com>
Co-authored-by: mbencer <mateusz.bencer@intel.com>
Co-authored-by: Aravind <aravindx.gunda@intel.com>
Co-authored-by: suryasidd <48925384+suryasidd@users.noreply.github.com>
2020-04-24 04:06:02 -07:00
Sheil Kumar
470f6e34d0
remove microsoft.ai.machinelearning.dll binpace (#3678)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-04-23 23:06:16 -07:00
Changming Sun
d97cb7338c Revert a change in attention 2020-04-23 22:56:02 -07:00
stevenlix
2ab78c5da1
Update TensorRT parser (#3650)
* update onnx-tensorrt submodule

* add more model dumping point

* update trt kernel name and docker readme file

* fix minior issues

* fix format issue

* update onnx-tensorrt submodule

Co-authored-by: stevenlix <stevenlix>
2020-04-23 20:51:44 -07:00
Pranav Sharma
939d036660
Add omp impl for tryparallelfor and modify gelu to use fastgelu impl. (#3667)
* Add omp impl for tryparallelfor and modify gelu to use fastgelu impl.

* Address PR comments.
2020-04-23 18:24:46 -07:00
Du Li
2659f205cc
Complex multiplication and conjugate contrib ops (#3384)
* adding ComplexMulConj

* Adding fp16 support.

* adding a util func
2020-04-23 17:21:48 -07:00
Ori Levari
bae1dd7f04
add test for LearningModel creation from missing model path (#3661) 2020-04-23 15:37:32 -07:00
Sheil Kumar
2d2375aa23
swap float16/float (#3663)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-04-23 14:27:18 -07:00
Yufeng Li
c0e817ff16
Fix a bug in skiplayernorm fusion pattern 2 (#3660)
For skiplayernorm fusion pattern 2, its input[0] should be equal to the input[0] of Add_1, but is overridden by the input[0] of Add_2.
2020-04-23 14:18:59 -07:00
David Brownell
3ce31933bb
Wheel file updates for FeaturizerLibrary data (#3640) 2020-04-23 13:27:22 -07:00
Xavier Dupré
5777fc18c3
Removes omp for ThreadPool in TreeEsemble* (#3596)
* Removes omp to use ThreadPool

* removes unnecessary old OMP code

* rename compute_agg, use ThreadPool::NumThreads

Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
2020-04-22 23:48:31 -07:00
gwang-msft
02bae6bd06
Not use OpenMP for android build (#3636) 2020-04-22 21:17:05 -07:00
Changming Sun
00917917d6
Downgrade numpy requirement to 1.16.6 (#3635) 2020-04-22 16:11:33 -07:00
Mikhail Kuznetsov
3cf3595579
Replaced spaces on tabs (#3555) 2020-04-22 15:16:19 -07:00
Ye Wang
7837c7efc3
Add Features to ShortGrainDropper for ONNX export (#3628)
* add features to short_grain_dropper for ONNX export

* update FeaturizersLibrary

* fix warnings
2020-04-22 14:09:39 -07:00
Ye Wang
70b554cc85
Add Features to ForecastingPivot Transformer for ONNX Export (#3608)
* checkin

* fix MSVC build error

* test changes

* split pivot output into multiple tensors

* add horizon tensor

* Support multiple types for non-pivot tensor

* limit horizon tensor type to int32_t as max_horizon type

* work around some conversion warnings for local machine

* support variadic shape for non-pivot input

* dropping all rows is an exception

* fix a bug

* fix the way that generates horizon tensor

* more tests added

* add TypeConstraint() in ONNX_OPERATOR_KERNEL_EX

* update Featurizerslibrary
2020-04-22 13:09:31 -07:00
Paul McDaniel
2c74766ad1
Add new docs around how to bind to the onnxruntime.dll (#3539) 2020-04-22 11:24:36 -07:00
Tianlei Wu
d69bc31309
Refine BERT optimization script options (#3618)
* Remove paramters like --gpu_only --sequence_length. Update bert GPU notebook accordingly.
* Remove input_int32 and float16 parameters from constructors of BertOnnxModel class and other classes derived from it. 
* Update gpt2 benchmark. Add comments in gpt2 notebook to indicate work in progress. Clear notebook output before official 1.3.0 release is ready.
2020-04-21 21:28:06 -07:00
Scott McKay
b4508dbdc6
Improve TopK performance. (#3612)
* Update TopK implementation.
  - add faster heap
  - special case k=1
  - update selector for when to use heap and when to use nth_element based on performance testing
  - parallelize if enough work to do
  - reduce templatized code
  - add some extra unit tests.

Perf tested vs. master. Average speedup is 3.75x using this combination of input sizes:

```
    batches = [10, 25, 50]
    batch_size = [8, 16, 32, 64, 128, 256, 512, 1024, 2048]
    k = [1, 2, 4, 6, 8, 16, 24, 32, 48, 64, 128]
```

For larger batches (e.g. 50x2048) the speedup is over 20x.
2020-04-22 10:05:13 +10:00
Pranav Sharma
9636da3951
Threadpool related changes. (#3564)
Threadpool related changes.

Don't create ORT threadpool if openmp is enabled (except for inter op threadpool).
Created a new static function ThreadPool::NumThreads to account for openmp settings and null threadpool ptr.
Log a warning when using SetIntraOpNumThreads when openmp is enabled.
Added a document for ORT devs.
Fix LSTM to use the new threadpool abstractions.
Rename GetNumCpuCores to GetThreadAffinityMasks and move it to the Env class.

Co-authored-by: Tracy Sharpe <tracysh@microsoft.com>
2020-04-21 09:57:39 -07:00
Adam Pocock
3dd3f84116
[Java] Adding model metadata support (#3573)
* java - adding deployment information to build.gradle.

* java - adding support for model metadata.
2020-04-21 02:28:15 -07:00
George Wu
1c37d5e6ec
debug option for dumping tensorrt subgraphs. (#3604) 2020-04-21 11:55:30 +08:00
pengwa
e233e6ba45
Refactor - ScatterElements (#3559)
Refactor ScatterElements using MLTypeCallDispatcherRet to refactor
2020-04-21 08:58:42 +08:00
Changming Sun
2579a72a88
Convert Gelu to use TryParallelFor (#3599) 2020-04-20 17:32:39 -07:00
Changming Sun
911d125323 Remove openmp from gpu build 2020-04-20 17:13:54 -07:00
Sheil Kumar
31b6629e99
Fork WinML IDL Guids (#3591)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-04-20 09:17:07 -07:00
Prabhat
381fee47ab
Added support to build onnxruntime with ACL (#3586)
* Added support to build onnxruntime with ACL

* Added ACL build instructions
2020-04-20 13:35:28 +05:30
Changming Sun
75426a3091 Fix build break 2020-04-19 18:32:46 -07:00
Zhang Lei
422266c445
Support conv transpos 1D in cuda provider. (#3300)
* Support conv transpos 1D in cuda provider.

* Clear some old comment. Enable conv_transpose_1d onnx test for cuda.
2020-04-19 22:07:34 +08:00
Scott McKay
7d5348f87e
Add ability to batch device copy for graph inputs and outputs. (#3580)
* Add ability to batch device copy for graph inputs and outputs.
2020-04-19 17:51:07 +10:00
Prabhat
ea62b3435a
Clean up build.py code (#3466) 2020-04-18 20:48:30 -07:00
Maxim Kalinin
fcf0f6ee9f
Generalize reshape fusion (#3554)
* Generalize reshape fusion

* Allow arbitrary number of Concat arguments
* Apply fusion even when an output of an internal node is used elsewhere
* Fix a bug when an internal node's output is the subgraph output
* Simplify code
2020-04-18 20:47:23 -07:00
Tiago Koji Castro Shibata
14e387aa1a
Fix WinML namespace build break (#3583)
* Add missing winrt namespace

* Conditional compilation of dxcore code

* Fix TAEF macros
2020-04-18 20:46:01 -07:00
Sherlock
56b223bc60
Implement OneHot CUDA Kernels (#3390)
* Implement OneHot CUDA Kernels

* Support fp16

* Use HandleNegativeAxis

* Make MLFloat16 test GPU only
2020-04-18 17:41:39 -07:00
Hariharan Seshadri
1599562016 Fix BatchNorm CUDA kernel definition 2020-04-18 17:21:29 -07:00
Zhang Lei
c365822808
Refactor some for the calibate.py. Add QLinearAdd and QLinearMul support. Fix bugs loading jpgs not strict RGB, and typoes in load_batch call. (#3542) 2020-04-18 17:10:55 -07:00
Dmitri Smirnov
db9566f70d
Implement Inverse(12) for CPU and CUDA (#3485) 2020-04-18 17:10:21 -07:00
Dmitri Smirnov
38a18023c7
Fix some too popular warnings. (#3578)
Some pointless and noisy warnings either fixed or disabled.
2020-04-18 17:05:05 -07:00
Changming Sun
d68245853e
Disable downloading test data on Linux (#3581) 2020-04-18 15:54:58 -07:00
Sergii Dymchenko
3e884b4b6b
Fix some typos. (#3582)
* Fix some typos.

* Fix a typo.
2020-04-18 14:18:05 -07:00
suryasidd
6fe688c732
Disabled failed maxpool test on GPU (#3549) 2020-04-18 13:49:42 -07:00
Tianlei Wu
7f46f347db
Add GPT2 Attention Fusion in optimization script (#3488)
* Add Attention fusion for GPT2
* Support distilgpt2 in benchmark_gpt2.py
* Add options to disable Attention/SkipLayerNormalization/EmbedLayerNormalization/BiasGelu fusions
* Add logging at the begining of each fusion
* Update notebooks: Add Gpt2OnnxModel.py to list of script files.
* Add test for gpt2 model optimization
* Add optional parameters (--input_ids --segment_ids --input_mask) for graph inputs
* Fuse BiasGelu
* Handle model that does not have segment_ids input.
* Allow fuse embed layer without mask
2020-04-17 16:23:53 -07:00
Tianlei Wu
5d3b217039
Update Attention operator for GPT2 (#3474)
Add unidrectional mask for Attention operator.
Update mask_index to mask broadcast from B->BxS->BxNxSxS to B->BxSxS->BxNxSxS.
2020-04-17 16:20:40 -07:00
Hariharan Seshadri
b4457ecb7a
Fix gen_doc build option and refresh documentation (#3545)
* Support listing keys in custom metadata map via C/C++ API

* nit

* PR feedback

* Nit

* Initial commit

* More changes

* Support listing keys in custom metadata map via C/C++ API

* nit

* PR feedback

* Nit

* Initial commit

* More changes

* Add md files

* Doc changes

* Update

* revert cmake changes

* Update

* Doc change

* Update

* Update
2020-04-17 14:41:04 -07:00
Hector Li
5acd8dbe7d
remove option --enable_lto (#3515) 2020-04-17 14:18:56 -07:00