Commit graph

7863 commits

Author SHA1 Message Date
Chi Lo
91075255a7
Enable TRT provider option configuration for C# (updated version) (#7808)
* prepare for C# to configure provider options

* add c# code

* revert modification

* Add update provider info configuration in trt ep side

* fix bugs

* fix bug for compiler error C2259

* Add c# test

* fix bug

* fix bug

* Properly deal with string

* Add c# api for accepting trt provider options

* fix bug

* Modify C# test

* add shared lib test

* Add get provider options functionality

* clean up

* clean up

* fix bug

* fix bugs for CI

* Fix bugs for CI and documentation

* Move TRT EP provider options related functions out of C API

* revert

* fix bug

* refactor

* add check for provider options string

* code refactor

* fix CI bug

* Fix CI bugs

* clean up

* fix bug

* Fix bug for Post Analysis

* fix accidental bug

* Add API_IMPL_BEGIN/API_IMPL_END

* clean up

* code refactor

* code refactor

* fix CI fail

* fix bug

* use string append

* Change the code to better handle strncpy and string append
2021-06-25 03:21:22 -07:00
Ryan Hill
49938cce77
Fix Python Cuda loading issues (#7939) 2021-06-25 02:26:50 -07:00
Changming Sun
378a98597e Use std::make_reverse_iterator directly 2021-06-24 15:29:39 -07:00
ashbhandare
00e44861c5
Fetching frontier tensors to frontend for ORTModule (#8086)
* Fetching frontier tensors to frontend

* Move before session initialize call
2021-06-24 15:04:35 -07:00
SilvanK4t1qbit
eb36258df4
Enable signed int8 data type for activations in static quantization (#7029)
* Add support for signed int8 static activation quantization. Make symmetrization in quantization switcheable
2021-06-24 14:42:22 -07:00
Ryan Hill
e083d207cf
Disable InitProvidersSharedLibrary when training is enabled. (#8132) 2021-06-24 13:55:56 -07:00
Adam Pocock
7ed9f5fc90
[Java] Fixing the creation of OnnxTensors from scalars, adding tests (#8023)
* Fixing the creation of OnnxTensors from scalars, adding tests.

* Documentation fixes from the review.
2021-06-24 13:21:35 -07:00
Negin Raoof
80b7b134bf
Adding optional ops in contrib ops (#7946)
* Added optional const spec
2021-06-24 13:16:31 -07:00
Sherlock
59e336040c
Ortmodule override torch.manual_seed() (#8131)
* Ortmodule override torch.manual_seed()
2021-06-24 11:51:25 -07:00
Viswanath Boga
b478086bc1
Fuse attention node even in case of different Q,K hidden dimensions (#8106)
* changes to fuse attention node and create varied dimensions

* added an option to optimizer to only do offline fusion

* fixing a typo

* merge with master

* removing extra changes

* added new unit test - test_attention_fusion_for_varied_qkv_dimensions()

* Unit test succesfull for q,k,v paths with varied dimensions

* adding test model for unit test case

* optimizing attention tests

* removing debugs

* minor change

* addressing comments

* addressing comments

* changed the new option to disable_onnxruntime

* replacing asserts with debugs

* make attn fusion backward compatible for head_size, hidden_size

* preserving behavior for shape_modified_tensor

* adding new option as the last parameter

* cleaning up

* line breaks and spaces

* formatting according to python

* making the changes to fuse attention node without user input

* changes to fusion_attention.py updated

* bringing the code up to python standard
2021-06-24 08:03:21 -07:00
Hariharan Seshadri
4fd7efcf0d
Update logic in props.xml to account for shared provider library changes (#8138) 2021-06-23 20:41:44 -07:00
Changming Sun
f000dfddbe
Update run_dockerbuild.sh: set default python version based on OS version (#8136) 2021-06-23 15:50:03 -07:00
Changming Sun
1fa6986656
Chang how numpy version is handled. (#8130)
Numpy has binary compatibility, which means "binaries compiled against a given version of NumPy will still run correctly with newer NumPy versions, but not with older versions." So, if an onnx runtime package was built with numpy version A, then at run time it requires numpy version >=A. In this change, we read numpy version from the installed packages at build time, to avoid manually keeping the build time/runtime consistency.
2021-06-23 14:08:37 -07:00
Tixxx
db88f3059c
[js] fixing broadcast issues in pack mode (#8090)
* fixing broadcast issues in pack mode

* improved bcast logic for matmul

* removed TODO

* rebased from master
2021-06-23 09:55:19 -07:00
Tracy Sharpe
cbdd59dae9
MLAS: enable SSE 4.1 path for x86 build (#8127) 2021-06-23 09:38:58 -07:00
Xiaoyu Liu
45ce239929
User dynamic axes in one step beam search output (#8092) 2021-06-23 01:41:32 -07:00
Scott McKay
cccd61e3bc
Add int64 as a required type to ConstantOfShape as it's used by the pytorch converter for Pad. (#8128)
It's also used pointlessly for torch.tensor.repeat (although that usage should always be able to be constant folded).
2021-06-23 14:53:06 +10:00
Edward Chen
b1e21312b5
[Mobile package] Update required operator config with additional ops for newer version of Wav2Vec 2. (#8123)
This is an update to https://github.com/microsoft/onnxruntime/pull/8079
The sample application motivating the original update changed to use an updated version of the model. Now, fewer ops are required. This change removes the previously added ops which are no longer needed.
2021-06-22 19:19:46 -07:00
Evgenii Indenbom
664e548e31 Col2im optimization by eliminating integer multiplications:
1. No padding branch performance is improved 8 times
2. Symmetric padding branch is generalized for asymmetric padding case (padding symmetry was not actually used) and further optimized by eliminating integer multiplications.
2021-06-22 18:44:20 -07:00
Changming Sun
6e2b064aec
Delete some unused code in run_dockerbuild.sh and Enable Nuget CUDA tests (#8089)
1. Remove some unused code and simplify tools/ci_build/github/linux/run_dockerbuild.sh.
2. Enable Nuget CUDA tests. The original design was we could leverage Directory.Build.props and let cmake generate the required properties(USE_CUDA/...) there. However, in nuget packaging pipeline we test the package on a different host that doesn't run cmake command and doesn't have the auto-generated Directory.Build.props file.
2021-06-22 18:43:33 -07:00
Guoyu Wang
f6292d9b38
[Android] Output error message to android log instead of stderr (#8114)
* Output error message to android log instead of stderr

* Address CR comments, move macro to a helper function

* Address CR comments

* Fix ort minimal build break
2021-06-22 17:50:06 -07:00
Guoyu Wang
9003df5d87
Fix 32bit Android java API crash (#8122)
* Fix 32bit Android java API crash

* fix code formating
2021-06-22 17:41:11 -07:00
Yufeng Li
4bb0e29d0e
initialize generated_value_names with graph input (#8085)
* initialize generated_value_names with graph input
* use set for following usage
2021-06-22 15:08:54 -07:00
Ryan Lai
839f69d249
Implement WINRT_IMPL_LoadLibraryW to avoid calling LoadLibraryW directly (#8065)
* Override load library w in cppwinrt

* Add comment
2021-06-22 14:31:20 -07:00
Shucai Xiao
e7d7fa8fa2
Update migraphx to rocm4.2 (#7994)
* update dockerfile for migraphx ep

* update to rocm4.2

* code cleanup

* fix error related to onnx unit tests
2021-06-22 13:39:51 -07:00
Changming Sun
5809890ba2
Fix a compile error in InferenceTest.cs (#8119) 2021-06-22 13:01:35 -07:00
Sunghoon
8cacb26946
remove debug.keystore from repository due to a credential issue report (#8113) 2021-06-22 10:15:10 -07:00
Chi Lo
27d1784d44
Add TRT 7.1 Pipeline (#8073)
* Revert for testing TensorRT 7.1

* change to origianl googletest version

* change machine

* remove build arg

* change back machine

* revert back googletest version

* Make it ready to merge to master

* revert onnx-tensorrt to v7.1

* rename yml

* use [[ ]] in bash command

* add sudo

* add chmod

* add correct path

* change another way to revert onnx-tensorrt

* change docker image to manylinux build
2021-06-21 20:57:04 -07:00
chethanpk
3cd06cb38c
Added support for ReduceMean on DNNL EP for CPU and GPU (#7902)
* Added support for ReduceMean on DNNL EP for CPU and GPU

Signed-off-by: Chethan Palangotu Keshava <chethan.palangotu.keshava@intel.com>

* Added fix for a resnet model failure where it was failing to create dst shape for reducemean when it was part of a subgraph with other ops

Signed-off-by: Chethan Palangotu Keshava <chethan.palangotu.keshava@intel.com>

* Removing the DNNL EP from these unit tests. This is in anticipation of two changes:
- DNNL EP unit tests would be added in a different location later on, so addition of EP individually to these tests will not be necessary
- This was causing a memory leak fail in debug build. The bug is in the EP itself and not in the code added for reducemean. The fix for this is in the i/o handling overhaul which will be added later.

* Update reduction_ops_test.cc

Had accidentally deleted a new line. Making sure there are no unnecessary changes in this file
2021-06-21 17:15:46 -07:00
Du Li
352d560fd5
Adding Conv+Clip fusion (#8102) 2021-06-21 16:30:12 -07:00
Chandru Ramakrishnan
10b7ed6430
Added op_name to message when we are missing a kernel. (#8110)
* Added op_name to message when we are missing a kernel.

* Added domain and version

* Added missing ,
2021-06-21 14:45:53 -04:00
Changming Sun
cba4bc11c7
Split Linux CPU CI pipeline (#8097) 2021-06-21 10:52:30 -07:00
Bowen Bao
51c12a715b
Add NGramRepeatBlock contrib op (#8078)
**Description**: 
Enforce no repetition of n-grams. Scores are set to `-inf` for tokens that form a repeated n-gram if added to the back of the input_ids.

**Motivation and Context**
Needed by transformer models in sequence generation algorithms (greedy search and beam search). This module has heavy impact on performance, and can be highly parallelized.
2021-06-21 10:21:48 -07:00
Sherlock
5ac06bad61
Relax test tolerance to make CI more reliable (#8100) 2021-06-21 07:41:54 -07:00
Tang, Cheng
059d705988
support pass in custom op registry for eager mode (#8087)
* support pass in custom op registry for eager mode

* fix the comments
2021-06-20 13:38:09 -07:00
pengwa
9f5969693a
clean up builds for interop_torch (#8017)
* clean up builds for interop_torch

* add python dependency for executables

* disable onnxruntime_ENABLE_TRAINING_TORCH_INTEROP by default; enable it in ortmodule GPU training pipeline only

* disable training unrelated tests when torch interop is enabled

* simplify the python dependency.

* clean up and fix
2021-06-19 13:41:07 +08:00
Thiago Crepaldi
5c2e1bbb0a
Fix input schema extrator for ORTModule (#8098) 2021-06-18 21:47:49 -07:00
baijumeswani
7701c8703e
Add module attribute to ORTModule to support HuggingFace Trainer save_model (#8088) 2021-06-18 13:13:45 -07:00
Hariharan Seshadri
08eeb8763d
Loosen validation checks in Concat to unblock execution of model in #8020 (#8080) 2021-06-18 11:14:36 -07:00
Olivia Jain
b2247ece25
Make Perf Test Configurable (#7836)
- Allow anyone to kick off a perf test here. Customize: branch, eps, model selection, cuda version.
- Only run shape inference when required.
- Kill errored out memory processes.
- Remove warmup run.
- Clean up script.
- Standalone_TRT is it's own "EP" vs as an additional run with TRT EP
2021-06-18 11:11:19 -07:00
Edward Chen
aa68157c3d
[Mobile package] Update required operator config with additional ops for wav2vec2. (#8079)
Add some additional ops to the mobile package that are needed for the wav2vec2 model.
2021-06-17 13:08:15 -07:00
Guoyu Wang
d83f7fd4aa
[NNAPI EP] Enable Slice support (#8031)
* Enable slice for NNAPI EP

* Add ANEURALNETWORKS_STRIDED_SLICE support

* Addressed CR comments

* Addressed CR comments, rename PrepareForCompute to PrepareForComputeHelper to avoid confusion
2021-06-17 12:36:12 -07:00
Changming Sun
96989b83ee
Create python packages for DML (#8061) 2021-06-16 16:59:12 -07:00
Nick Kreeger
d924fd205b
Create and move quantization tests to a shared Quantized utils file. (#8054)
* Create a shared quantization util for all unit tests.

* Cleanup qlinear_binary_op_test.cc

* save

* save

* save

* cleanup

* save

* cleanup for linux build
2021-06-16 17:00:36 -05:00
Ryan Lai
365070b744 Merged PR 6158327: RI Onnxruntime github into DmlDev
This fixes merge conflict in onnxruntime/core/providers/dml/DmlExecutionProvider/src/GraphPartitioner.cpp

Related work items: #33589561
2021-06-16 21:22:12 +00:00
Guoyu Wang
32ef39be58
[Android] Move add header files into AAR to using Gradle (#8068)
* Move add header files into AAR to using Gradle

* fix gradle format violation
2021-06-16 12:03:42 -07:00
Ryan Hill
1d8edd0b5b
Fix missing files on linux (#8066) 2021-06-16 11:05:03 -07:00
Wei-Sheng Chin
c76172fab6
Fix PythonOp with input which has no gradient (#8011)
* Fix PythonOp with input has no gradient

* Fix another bug which happens when inputs require gradient

* Remove comments

Co-authored-by: Peng Wang <pengwa@microsoft.com>
2021-06-17 00:19:41 +08:00
Vincent Wang
de8f2ecda9
Reduce Kernel Optimization (#8067)
* reduce optimization

* bug fix

* add a check

* add ut

* refactor

* add ut cases for keepdims=true
2021-06-16 19:53:46 +08:00
Ryan Hill
0ebaa71f49
Improve Windows Platform system error messages (#8063) 2021-06-15 22:17:35 -07:00