Commit graph

4390 commits

Author SHA1 Message Date
Baiju Meswani
aa93f2e236 move SetOutputMLValue from op_kernel.h to op_kernel_context.h 2021-03-03 20:39:34 -08:00
Baiju Meswani
d5667554e6 Merge branch 'master' of github.com:microsoft/onnxruntime into bmeswani/merge_master_onto_ortmodule 2021-03-03 20:37:29 -08:00
baijumeswani
ed1883a97c
Workaround for HTTP Error 403: Forbidden for MNIST dataset (#6885) 2021-03-03 18:59:48 -08:00
Guoyu Wang
fedb68429c
[NNAPI EP] Add per-tensor u8s8 support for Qlinear[Conv/MatMul] (#6818)
* NNAPI Add per-tensor u8s8 support

* Update some comments

* Address CR comments

* Address CR comments
2021-03-03 15:44:49 -08:00
Guoyu Wang
3c5d811e77
[CoreML EP] Add [Average/Max]Pool support (#6870) 2021-03-03 14:32:39 -08:00
Hariharan Seshadri
9a9e741a8c
Support optional inputs/outputs in custom op development (#6727) 2021-03-03 05:59:23 -08:00
jingyanwangms
f22f04a109
Add comment (#6860)
Co-authored-by: Jingyan Wang <jingywa@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-03-02 18:54:25 -08:00
Faith Xu
6285ee2398
Reroute quantization tool readme to /docs page (#6854) 2021-03-02 13:49:42 -08:00
Ye Wang
9073f7a5c3
support opset13 in embednorm (#6866) 2021-03-02 12:33:40 -08:00
Ryan Hill
0d0eb2c85c
Change OpKernel class to be shared with shared providers (#6837)
In the previous shared providers there aren't many OpKernel classes, and the existing Provider_OpKernel wrapper was fine. With the opposibility of making Cuda a shared provider, having this need to be changed per OpKernel adds a lot of complexity.

It was fairly straightforward to make OpKernel work with shared providers with minimal changes.

In this change, the ONNX_OPERATOR_* macros can also be shared with the shared providers.
2021-03-02 00:53:48 -08:00
Hariharan Seshadri
38796ad451
Refine force CPU fallback logic in the CUDA EP (#6849) 2021-03-01 19:59:07 -08:00
Vincent Wang
4238ce341a
Add External Outputs Flag for YieldOp (#6789)
* add external outputs flag for YieldOp

* use kPreExisting

* add ut for mem_pattern

* fix ut after merge from master
2021-03-02 11:38:18 +08:00
Edward Chen
66df167a73
Add support for op kernel type control required types, require int64 for some ops (#6832)
Adds support for required types to the op kernel type control infrastructure. Required types are always enabled.
Added int64 as a required type for certain ops.
2021-03-01 19:04:29 -08:00
Guoyu Wang
36a44d55ed
Only report Android Baseline binary size for master branch (#6844)
* Only report binary size from master

* update script

* Correct the typo
2021-03-01 15:57:18 -08:00
Guoyu Wang
5cf6606964
[CoreML EP] Add Concat support (#6834)
* [CoreML EP] Add concat support

* Update comments
2021-03-01 13:35:44 -08:00
Sherlock
12edf22f11
Merge pull request #6838 from microsoft/mzs/ortmodule-api-sync-from-master-210226
Sync from master
2021-02-27 12:32:36 -08:00
Tianlei Wu
2d6e10ba00
Update Attention and QAttention to support pruned model (#6819)
* update Attention operator spec to support pruned model
* update Attention and QAttention cpu & cuda kernel
* Fix invalid embed layer norm fusion test models.
2021-02-27 09:50:16 -08:00
Thiago Crepaldi
f71d93ea2b
Enable PyTorch Lightning basic test on CI (#6809) 2021-02-27 09:35:42 -08:00
M. Zeeshan Siddiqui
ca48310d6d Merge branch 'master' of https://github.com/microsoft/onnxruntime into mzs/ortmodule-api-sync-from-master-210226 2021-02-27 04:25:23 +00:00
M. Zeeshan Siddiqui
cb8d8464bc
Do not create compute stream when external CUDA allocator is used. (#6833) 2021-02-26 20:13:02 -08:00
Ye Wang
b4b87ac7a0
update (#6827) 2021-02-26 13:58:41 -08:00
Sergii Dymchenko
059ed1c241
Copy forward signature from PyTorch model. (#6777) 2021-02-26 13:02:13 -08:00
baijumeswani
c1b0cf6d0b
Add pipeline to clear the cache for huggingface transormers models (#6813) 2021-02-26 10:39:22 -08:00
satyajandhyala
355057cf9c
Added RequiredGrad attribute to YieldOp (#6657)
* Added required_grad attribute to YieldOp

* Chagened YieldOp attribute to hold the indices of the required gradient outputs from the count, and removed the code reordering the outputs.

* Changed backward_output_grad_names to a map from backward output gradient name to the corresponding output index.
2021-02-26 10:38:38 -08:00
Pranav Prakash
d5175795d2
Improvements to quantizer: Removed unused qType field, add reshape op (#6179)
* Handle case where bias_name is already quantized

If bias is shared between multiple nodes and we've already quantized it, just return the quantized name from the map

* Remove qType attribute from QuantizedValue and QuantizedInitializer

These are unused (and were incorrectly set in the case of int8 quantization)

* Add Reshape op to quantizer

* Add test for Reshape quant
2021-02-26 10:21:37 -08:00
Surya Siddharth Pemmaraju
3426108739
Fixed issue in python cmake to update wheel package (#6384)
* Fixed issue in python cmake to update wheel package

* Fixes python cmake issue for OV EP

Added post build step for libonnxruntime_providers_openvino
that copies the updated libonnxruntime_providers_openvino.so file
to /onnxruntime/capi directory every time this target is rebuilt.

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

* Removed post_build step from onnxruntime_python.cmake

Now that we have added the post build step to copy
onnxruntime_providers_openvino.so and providers_shared.so
to /onnxruntime/capi directory in onnxruntime_providers.cmake file.
so removing the duplication of the same from here.

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

* Fixed python cmake issue for OpenVINO-EP

->Fixed issue for both Linux and windows

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

Co-authored-by: MaajidKhan <n.maajidkhan@gmail.com>
2021-02-26 06:34:43 -08:00
Sherlock
8a450d523f
Check gradient correctness in the UTs (#6803)
* Check gradient correctness in the UTs

Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-02-25 13:31:07 -08:00
baijumeswani
fa8a9015bd
Mount hf model cache and use cache for loading hf models (#6810) 2021-02-25 13:30:14 -08:00
Sergii Dymchenko
99ffffbe6a
Remove backward workaround from test. (#6811) 2021-02-25 13:23:46 -08:00
ashbhandare
b05403d877
Clear iobinding outputs (#6774) 2021-02-25 11:50:43 -08:00
Chi Lo
9b3171e95c
Make keepdims to its default value when adding ReduceMin/ReduceMax for quantization calibration (#6788)
* Make keepdims to its default value when adding ReduceMin/ReduceMax

* Fix bug for adding ReduceMin/ReduceMax with keepdims=1
2021-02-25 09:47:59 -08:00
Olivia Jain
db05d53b94
Setup perf in docker and add features (#6582)
* setup scripts to run in docker 
* percent threshold for accuracy 
* branch testing
2021-02-25 09:31:03 -08:00
stevenlix
d5f292ab73
fix issues caused by quantize/calibrate changes (#6802) 2021-02-25 05:41:21 -08:00
Maajid khan
7465673e33
[OpenVINO-EP] Find package changes (#6801)
* Find package changes to cmake

* Removing unwanted code from cmake

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

Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2021-02-25 05:12:57 -08:00
Suffian Khan
8a148e44fb
make ci pipeline also run batch and convergence test (#6798) 2021-02-24 20:18:03 -08:00
Hariharan Seshadri
ab1713f5cc
Fix regression in constant folding optimizer (#6795) 2021-02-24 19:10:14 -08:00
Sherlock
8e200e13fe
Rewrite ORTModule background task coordination (#6700)
* Introduce OrtTasks to replace EventPool

* return run_id to frontend

* pass run_id to backward

* OrtTasks support multiple bg_events

* make message_queue a member of orttask

* Replace MessageQueue with std::promise

* Move status_promise into Task

* Move terminate flag into Task

* Reenable previously disabled UTs

* Add unit tests

* Replace condition variables with std::promise

* Move to CreateBackgroundTask in the main thread

* return status and output in forward_future

* use throw for terminating background thread

* cleanup tasks at destructor

* reenable test_mixed_nnmodule_ortmodules_training

* add mutex for ORTTasks functions

* add mutex for bg_threads

* delay tests before start

* add ut for multi-task common backbone

Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-02-24 18:00:25 -08:00
baijumeswani
7ce4075bbd
Support nested sequence and mapping types in ORTModule (#6791) 2021-02-24 15:45:56 -08:00
Weixing Zhang
40fa40f3ce
Enable more unit tests for ROCM EP (#6776)
* enable more ops and unit tests for ROCM EP
2021-02-24 15:20:50 -08:00
Thiago Crepaldi
aa5cd37ac8
Refactor device handling and basic support for PyTorch Lightning (#6758) 2021-02-24 14:12:55 -08:00
Tianlei Wu
f4acdb2ecd
Update transformers benchmark for transformers 4.3.* and ORT 1.7 (#6796)
* update benchmark for transformers 4.* and ORT 1.7

* Fix gpt2 onnx conversion for transformers 4.3.*. Add a check of transformer version >= 3.1.

* remove code related to openmp

* update pretrain model list: keep representitive models only
2021-02-24 12:52:35 -08:00
fthielke
71a70ecf6e
Allow 3D ConvTranspose in CUDA execution provider (#6794)
Co-authored-by: Felix Thielke <felix.thielke@mevis.fraunhofer.de>
2021-02-24 11:53:31 -08:00
Adam Pocock
5a473216b7
[Java] Adds extra providers (#6770)
Add providers for CoreML, ROCM, NNAPI, ArmNN
 Adding the structs for OrtCUDAProviderOptions and OrtOpenVINOProviderOptions
 Updating NNAPI flags.
 Adding the new CoreML flag.
 Adding hooks to the build system to tell Java about the new providers.
2021-02-24 10:25:05 -08:00
Ye Wang
47c8e9ad28
Adding fp16 support for Einsum Cuda kernel (#6775)
* checkin einsum fp16 support

* remove unnecessary code

* add tests

* add another test
2021-02-24 01:15:29 -08:00
jingyanwangms
c02ec38f8a
[Running CI now] Remove duplicate tests to speed up CI (#6768)
* remove tests to speed up CI

* add back _into_data_parallelism tests to see how long the CI test takes

* remove unnecessary save calls

* add back data_parallelism_full_precision_bart_path

* add data_parallelism_full_precision_path

* remove data parallelism tests

Co-authored-by: Jingyan Wang <jingywa@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-02-23 23:21:06 -08:00
Scott McKay
7aa69a1f2a
Support building python bindings when building unit tests is manually disabled. (#6771)
* If unit tests are manually excluded via `--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF` (e.g. testing changes to binary size where you want to keep the build time as quick as possible) it should still be possible to create the python bindings.

Update CMakeLists.txt to decouple the inclusion of onnxruntime_python.cmake from unit tests being enabled.

Update onnxruntime_python.cmake so it works when unit tests are disabled. Also skip copying of test py files when unit tests are disabled.
2021-02-24 14:21:57 +10:00
baijumeswani
65ba51d93e
Re-enable test and increase timeout (#6785) 2021-02-23 18:51:06 -08:00
Thiago Crepaldi
563218dcda
Update torchtext usage for pytorch transformer sample (#6767)
* Update torchtext usage for pytorch transformer sample
* Temporarily disable tests to unblock repo (failures are being worked on already)
* Update loss numbers for ORTTrainer UTs
2021-02-23 14:06:35 -08:00
Ori Levari
b8b41e3775
Update DirectML 1.4.1 to 1.4.2 for ORT 1.7 (#6780)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-02-23 10:52:10 -08:00
Edward Chen
09a5d6a9dc
Update docs/ONNX_Runtime_for_Mobile_Platforms.md with info about op type reduction. (#6747) 2021-02-23 10:25:23 -08:00