Commit graph

5211 commits

Author SHA1 Message Date
Tianlei Wu
862bc8c7a0
shape infer for present output of Attention op (#8430) 2021-07-19 17:24:10 -07:00
harshithapv
0f989c6162
bumping onnxruntime version to 1.8.1 (#8429) 2021-07-19 16:48:56 -07:00
Ryan Hill
e04e1d5ce0
Move shared providers CPU providers into separate file (#8293) 2021-07-19 15:19:32 -07:00
Tianlei Wu
dfe42e185c
update bert notebook to use onnxruntime 1.8.1 (#8379) 2021-07-19 14:16:59 -07:00
Viswanath Boga
afce0e2543
Attention kernel update to handle different Q,K,V hidden sizes (#8039)
* changes working to convert akv nodes

* changes to replace nodes

* changes to accomodate qkv hidden sizes as attributes

* kernel to accept qkv_hidden_size attributes

* Working till compute for varied dimension, todo applyattention()

* changes to make all regression tests work

* inference running successfully without prepack

* success inference with pre-pack weights

* add test for diff sizes

* bias shape need not be a mul of 3

* get the output_hidden_size from input

* infer output shape from input

* merge with master

* cleaning up files that got merged wrong

* accurancy at accepted level

* added unit test case for different dimensions

* all unit tests passing

* packed weights working for attention

* prepacked weights working

* added test case for newly added extra qk input

* updated unit test to test only extra add qk

* fixing build error

* removing few debugs

* reverting test changes

* all python test passing

* cleaning up

* new unit test added, major clean up of code

* removed extra code

* minor

* minor fix to tests

* prepack weights code cleaned up

* compacted compute() in attention.cc

* reformat compute()

* making a parameter T

* adding 3 q,k,v buffers in all cases

* fixing build

* running tests only on cpu

* Updating docs

* trigger ci builds

* Addressing comments in PR

* addressing some more comments

* get add_qk_str from add_qk node directly

* updating docs, added extra check to verify attn inputs

* Optimized the extra add by parallelizing

* added attention_shape to symbolic_shape_infer.py

* minor refactoring to address comments
2021-07-19 12:21:33 -07:00
Sheil Kumar
c3129306e5
Enable string attributes for experimental model building (#8428)
* string attributes

* Update error message

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-07-19 11:48:41 -07:00
Maajid khan
1686e8ff57
[OpenVINO-EP] 2021.4 Release (#8369)
* Changes to ensure the openvino-ep-2021.4 branch is created
* Fix failing cpp and python unit tests
* Fixed Myriad Tests for Ov_2021.4
* Disabled failing python tests for myriad
* Fixes models which were breaking w.r.t 2021.4
* Added fixes to Fix tinyyolov3 working on Myriad
and MaskRcnn, FasterRcnn using GPU_FP32
* Added FP16 output data type support for ngraph
* Implemented ReadNetwork() method

->Using Core::ReadNetwork() method for reading and creating a CNNNework

->Since OpenVINO™ 2020.4 version, Inference Engine enables reading ONNX models
  via the Inference Engine Core API and there is no need to use directly the low-level
  ONNX* Importer API anymore. To read ONNX* models, it's recommended to use the
  Core::ReadNetwork() method that provide a uniform way to read models from ONNX format.

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Fixed ngraph f16 supported output type

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Added comments in data_ops.cc

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Fixed broken windows build

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Disable failing CPP tests on CPU

Some of the convtranspose tests are failing on
OpenVINO-EP CPU due to accuracy mismatch w.r.t
default CPU. so currently we are disbaling
these tests.

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Updated for ov version 2021.4

* Changes to include qdq ops in code

* Disabled failing python tests on GPU

Disabled two maxpool python tests on
GPU as they were passing but throwing
segfault

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Fix the backward compatibility issue

ReadNetwork() API has a bug and will only work
starting from OpenVINO 2021.4 version.

The previous versions will still have to use
onnx importer route

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* Fix CMakeLists.txt for OpenVINO EP

If a directory with OpenVINO is sourced,
the latest OpenVINO settings have to
be imported.

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

Co-authored-by: sfatimar <sahar.fatima@intel/com>
Co-authored-by: sfatimar <64512376+sfatimar@users.noreply.github.com>
Co-authored-by: Aravind Gunda <aravindx.gunda@intel.com>
2021-07-19 10:40:56 -07:00
Dwayne Robinson
8544c222ce
Fix build error about if being constant in Eigen and Protobuf (#8291)
* Fix build error about if being constant in Eigen and Protobuf
* Update with Changming's proposal
2021-07-18 00:35:24 -07:00
Edward Chen
4a614637a7
[NNAPI EP] Update NnapiExecutionProvider::GetCapability() to use partitioning utils (#8387) 2021-07-16 17:42:10 -07:00
Hariharan Seshadri
2f408f757e
Improve performance of Pad CUDA kernel (#8408) 2021-07-16 09:44:16 -07:00
sumitsays
127b1f0d01
SDL Native Warning errors in DML ep (#8396)
* Updated d3dx12.h with latest change. Fixed SDL native warning errors

* Removed usage of IID_ID3D12Device variable, instead used __uuidof as in previous commit

* Removed usage of NULL, used nullptr instead.

Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-07-15 23:17:47 -07:00
Guoyu Wang
bcd50afafb
[CoreML EP] Fix failure for layer without name (#8399)
* Fix CoreML failure for layer without name

* Update clip op builder to new naming function
2021-07-15 11:52:01 -07:00
Nick Kreeger
963d883de8
Create a common directory for quantization code and functionality. (#8320) 2021-07-14 22:56:58 -05:00
Edward Chen
ef930b3ca9
[Objective-C API] Fix ORTIsCoreMLExecutionProviderAvailable link error when used from Swift. (#8350) 2021-07-14 18:38:58 -07:00
Guoyu Wang
c5038063ed
Add iOS/macOS static framework (#8357)
* Add ability to generate ios static framework

* Fix typos

* Add pod cache clean, update some comments of previous commit

* Fix CI failure with newly added cpuinfo library

* Update test model (CoreML requires node has a name)

* Addressed CR comments
2021-07-14 16:39:17 -07:00
Tianlei Wu
41f1280fc9
Fix transformer optimizer (#8392)
* fix a few issues
2021-07-14 16:00:17 -07:00
Edward Chen
88d1ffe9b8
Fix invalid access in log call. (#8389)
Fix bug that shows up when running tests (in particular, GraphTransformationTests.ConcatSliceEliminationTest) with more verbose logging level.

There is a log statement that doesn't get evaluated at the default test logging level (warning). It was accessing the first element of an empty vector. This change moves that log statement before the point where that vector is cleared.
2021-07-14 15:09:45 -07:00
Yulong Wang
0a1c00e8db
[js/node] remove unused dependency node-pre-gyp-github (#8388) 2021-07-14 14:30:44 -07:00
Tianlei Wu
5cd254aa79
update gpt2 attention fusion for past pattern (#8375) 2021-07-14 12:04:53 -07:00
Changming Sun
4e1c5f6ef4
Move the samples to a new repo (#8374)
Move the samples to a new repo https://github.com/microsoft/onnxruntime-inference-examples
2021-07-14 11:16:39 -07:00
Sherlock
4931ef666d
Update ORTModule frontend code owner file (#8335) 2021-07-14 09:26:04 -07:00
Guoyu Wang
68c5eb5414
Fix reduced ops CI failure (#8377) 2021-07-13 20:53:57 -07:00
Tianlei Wu
e340a59993
Update machine info script for transformers notebooks (#8376)
* fix constructor
* update machine_info
* refactor shape_infer_helper
2021-07-13 19:54:27 -07:00
Edward Chen
16f6904232
[iOS] Packaging pipeline improvements. (#8324)
Updates to the iOS packaging pipeline:
- Make it harder to overwrite package archives accidentally when uploading (fails if the archive already exists)
- Only upload package archives for release builds
- Some clean up
2021-07-13 18:48:28 -07:00
Chen Fu
0020703d00
Fix cpuinfo initialization failure in mlas test (#8366)
Fix cpuinfo initialization failure in mlas test


Co-authored-by: Chen Fu <fuchen@microsoft.com>
2021-07-13 18:39:15 -07:00
Ye Wang
04297110c3
Support int64 in ReduceMin cuda op for Opset 14 (#8307)
* reducemin int64_t support

* fix xxcuda.so load error

* testtest

* refactor

* update doc

* propagate types to opset14

* re-generate doc

* rename macro
2021-07-13 16:18:06 -07:00
Jeff Daily
8d8db7c9f0
[ROCm] clear last status if hipErrorNotReady (#8358)
* [ROCm] clear last status if hipErrorNotReady

* use hipEventDisableTiming in rocm_fence.cc

* fix syntax errors

* destroy event before handle becomes invalid
2021-07-13 15:58:40 -07:00
Nick Kreeger
178c139718
cleanup formatting in skip_layer_norm.cc (#8371) 2021-07-13 16:36:41 -05:00
Chi Lo
31f291f0af
Add TRT EP memory leak test into trt perf script (#8155)
* Add memory check for TRT perf

* Revise test app

* Add memory check for TRT perf

* Revise test app

* add test cases

* Modify script and add pipeline YAML

* remove redundant code

* temporarily change

* Change YAML

* revise test app

* fix minor bug

* code refactor

* small fix

* temporarily change for test

* prepare result log

* rm container when it exits

* code refactor
2021-07-13 09:39:08 -07:00
KeDengMS
eda1411e03
Fix symbolic shape inference regression in RoBERTa training (#8364)
* Needs to assign shape field for scalar output

* Add op test for SoftmaxCrossEntropyLoss
2021-07-13 08:15:53 -07:00
pengwa
7db4fc8c2a
Fix segment fault for custom function (#8331)
* unregister registered python functions upon normal interpreter termination
* atexit.register(unregister_python_functions) should be called by __init__.py
* minor fix
2021-07-13 18:01:33 +08:00
Yufeng Li
5bf862eef9
Fix build break on windows arm64 (#8361) 2021-07-12 22:35:21 -07:00
Changming Sun
530d7bb46d
Temporarily disable transformers tool test (#8360) 2021-07-12 20:31:22 -07:00
Zuwei Zhao
0a5b75f5cd
Update submodule onnxruntime-extensions. (#8282)
* Update submodule onnxruntime-extensions to latest.

* Add document for onnxruntime-extensions.

* Update cgmanifest.json for onnxruntime-extensions.

* Add example in JavaScript.

Co-authored-by: Zuwei Zhao <zuzhao@microsoft.com>
2021-07-13 10:21:11 +08:00
Changming Sun
29ca08a729 Update Dockerfile.cuda: remove compute capability 30
30 is not supported in CUDA 11.1.

35,37,50 are deprecated.
2021-07-12 15:19:48 -07:00
Chen Fu
df4cb6f301
Adding pytorch cpuinfo as dependency (#8178)
Pytorch cpuinfo library allows us to query current cpu features, micro-architecture and cache size, etc. These information is needed for targeted performance optimizations.

Unfortunately it does not work under Windows/ARM. We need to develop our own later
2021-07-12 14:21:12 -07:00
Sheil Kumar
eec8e1394a
Memory map files on windows to speed up model load (#8349)
* Memory map files on windows to speed up model load

* fix custom ops

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-07-12 11:52:08 -07:00
Yufeng Li
f6956e0259
Refactor qgemm file (#8322)
This PR purely extracts each kernel to a standalone file. No functionality change. It includes specifically:

leave the MlasGemm function and thread handling in the qgemm.cc
put dispatcher functions and the template functions (interfaces) that are required to implement a kernel into qgemm.h
put each kernel implementation in a separate file, which implements/specialize template functions: MlasGemmU8X8FixupZeroPointB, MlasGemmU8X8CopyPackA, MlasGemmU8X8CopyPackB, MlasGemmU8X8Kernel
determine the files to be compiled in cmake file
2021-07-12 10:13:20 -07:00
KeDengMS
b7c9696ac3
Symbolic_shape_infer fixes (#8280)
1. Add support for sequence ops: ConcatFromSequence, SequenceAt, SequenceInsert. There are other sequence ops supported by onnx that worked well after adding these ops, so no need to add all of them in symbolic_shape_infer
2. For If node, the two branches output might have different shapes. In that case, for sequence output, use None in dimension; For tensor output, create a new symbolic dimension.
3. Fix a bug in Tile, where input for repeats might be of unknown value
4. Topological sort of nodes in graph need to consider implicit input in subgraphs for If/Loop/Scan ops
5. Generate unique prefix for new dimensions inside subgraph
2021-07-09 19:14:26 -07:00
Guoyu Wang
10142f9510
Add metadata_props to ORT model (#8340)
* Add metadata_props to ORT model

* Minor update

* Update python binding, and increase the minimal pipeline size threshold

* Fixed a small bug in serializing ir_version

* Remove temp ort.py.fbs and add it to .gitignore
2021-07-09 11:28:27 -07:00
Changming Sun
60641a19e4
Add "/external:templates-" to VC++ flags (#8338) 2021-07-09 11:23:53 -07:00
Tang, Cheng
e467d78a11
fix a typo (#8334)
Co-authored-by: Cheng Tang <chenta@microsoft.com>
2021-07-09 09:24:43 -07:00
Tang, Cheng
598454bb5f
Fix the mix precision handle for square case (#8333)
* handle unsqueeze change in opset13

* fix the node arguments index check for square case (x * x)

* Revert "fix the node arguments index check for square case (x * x)"

This reverts commit c66344f0a82c35d8c24d31f2264cf7e9b235ce22.

* handle the square case (x * x) for node argument search

Co-authored-by: Cheng Tang <chenta@microsoft.com>
2021-07-09 09:24:19 -07:00
Rachel Guo
187743726b
[CoreML EP] Add Int32<->Int64 handling around coreml ep (#8183)
* initial int32-int64 type handling

* initial

* clean and fix UT error

* modify code comments

* address partial pr comments

* minor update

* address pr comments

Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2021-07-09 09:08:05 -07:00
Hariharan Seshadri
5369821ad6
Support SpaceDepth ops in the CUDA and ROCM EPs (#7960) 2021-07-09 01:00:22 -07:00
Scott McKay
1b2e1a7e0c
Refactor QDQ optimizers to enable future usage in minimal build (#8191)
* Add new transformer that can split node selection from node modification to allow just the modifications to be applied at runtime in a minimal build. This is the first step of a few to enable a QDQ model to be optimized for the NNAPI EP and/or the CPU EP at runtime in a mobile scenario.
Add generic and QDQ specific helpers for selection and modification.
Replace existing QDQ optimizers with optimizer based on new approach.
2021-07-09 16:11:43 +10:00
Hariharan Seshadri
46e5c8d4b9
Cosmetic change in test infrastructure (#8292) 2021-07-08 21:52:02 -07:00
pengwa
5454af4b95
decouple the shared python dependency (#8294)
* remove warnining message for non-training build

* move to/from dlpack for onnxruntime_python back into python project
2021-07-09 11:47:11 +08:00
Dmitry Yutkin
067759b387 Fix bad URL to huggingface onnx-export example notebook 2021-07-08 15:01:46 -07:00
satyajandhyala
84bc20fe9d
Enable cast propagation with level one by default. (#8286) 2021-07-08 14:38:09 -07:00