Commit graph

11997 commits

Author SHA1 Message Date
Vincent Wang
cec919bae9
handle 8 bit uint dlpack tensor (#7069) 2021-03-20 08:00:49 +08:00
Edward Chen
8d5bfdeb47
Increase timeout for Android CI pipeline by 30 minutes. (#7065) 2021-03-19 08:03:22 -07:00
Chi Lo
8c3b59a026
Quantization calibration refactor (#6893)
* Code refactor

* Modify code to tackle OOM when calibrating on larget dataset

* Fix mismatch issue when setting keepdims on ReduceMin/ReduceMax

* Add COCO val 2017 annotation

* Fix mismatch issue when setting keepdims on ReduceMin/ReduceMax

* Fix bug of "No module named:onnxruntime.quantization.CalTableFlatBuffers"

* Check and install flatbuffers module

* Add script to donwload coco dataset image and refactor example

* Fix bug of "No module
named:onnxruntime.quantization.CalTableFlatBuffers"

* Add CalTableFaltBuffers as module

* Remove annotation, user can download by themselves.

* Uncommet code

* Add back instances_val2017.json

* Make sure flatbuffers installed when ORT is installed

* Refactor code to call coco api

* Enable FP16 for example
2021-03-19 01:09:11 -07:00
Changming Sun
701e73b5b8
Move Linux minimal build CI pipeline to the new Linux machine pool (#7050) 2021-03-18 12:09:12 -07:00
satyajandhyala
8bc275e93f
Enhance Transpose, Cast and MatMul fusion when Cast and/or Fusion feeds multiple nodes. (#7021)
* Added new Transpose+Cast+MatMul => Cast+FusedMatMul test scenarios.

* The Cast node may feed more than one node.

* Transpose node may feed multiple nodes and still may be fused with MatMul nodes.
2021-03-18 11:41:58 -07:00
Suffian Khan
1a1dd4843d
Enable opset 13 for Rocm (#7047)
* enable opset13

* import cuda changes for opset 13 softmax to rocm as well
2021-03-18 10:09:45 -07:00
Guoyu Wang
7c7d6debe6
[CoreML EP] Add Resize Support (#7015)
* code placeholders

* Add previously missing comments

* [CoreML EP] Add Resize Support
2021-03-17 23:27:41 -07:00
Adrian Tsai
3d37a3c1d3 Merged PR 5807585: Remove support for strided 64-bit emulation in DML's Cast kernel
A model from one of our partners regressed with a failure to evaluate due to the addition of strided 64-bit emulation in the DML EP for the Cast operator. Specifically, the model uses a Cast from int32 to int64 to produce the input shape to a Reshape node. When supplied with a shape dimension of -1 (int32 0xffffffff), the strided emulation in Cast ends up producing an int64 result of 0x00000000ffffffff. This is then fed into the Reshape operator, where it produces an incorrect tensor shape and a failure during evaluation.

Generally speaking we assume that using strided 64-bit emulation is safe if a node's inputs came from the DML EP itself. This isn't true in the general case for Cast, however - casting negative signed values can and will produce incorrect outputs with strided emulation.

After this change, Cast nodes with 64-bit types will fall back to CPU unless running on a GPU that native supports 64-bit datatypes.

Related work items: #31768166
2021-03-18 00:42:32 +00:00
Jeff Bloomfield
897a0b9839 Merged PR 5807395: Add DML kernels for QLinearAdd (com.microsoft namespace) and DynamicQuantizeLinear
Related work items: #32165595
2021-03-18 00:15:46 +00:00
Xavier Dupré
514444d820
Fix pipeline generating python documentation (#7027)
Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
2021-03-17 16:57:51 -07:00
Thiago Crepaldi
c60ef62190
Update ORTModule feature with remaining PRs from feature branch (#7040)
* Liqun/ort module perf1 (#6806)

add mysql script to log perf data
Co-authored-by: liqun <liqun@OrtTrainingDev4.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>

* Resolve HTTP Error 503: Service Unavailable for MNIST dataset (#6989)

* Reduce logging for ORTModule for the end user (#6982)

* Support none types in forward output (#7001)

* Missed test case for none type output (#7014)

* Fix code style according to autopep8

Co-authored-by: liqunfu <liqfu@microsoft.com>
Co-authored-by: baijumeswani <bmeswani@microsoft.com>
2021-03-17 16:32:32 -07:00
Cecilia Liu
4fd9fef9ee
Support HuggingFace Models Converted From tf2onnx in Python Script (#6985)
Support tf2onnx huggingface models in python script
2021-03-17 15:33:57 -07:00
Tiago Koji Castro Shibata
934bb52cfb Merged PR 5805461: Add ARM64X forwarder libs
Add ARM64X implementation libs, to be forwarded to by the ARM64X lib.

From Ben Niu:

For system dlls that are built outside of windows repo and ingested through vpacks or binary check-ins, we always start by trying to port them to ARM64X. However, due to immature support for ARM64X build from Visual Studio 2019, it could be quite uphill to port dlls to ARM64X.

When that happens, we have an alternative without porting the dll to ARM64X. The alternative solution is, we build an ARM64X pure forwarder from windows repo, for example, onnxruntime.dll. That forwarder does nothing but forwards all the ARM64 API calls to a native ARM64 onnxruntime_arm64.dll, and all the x64 APIs to native x64 onnxruntime_amd64.dll. Please see here for an example: 29ae6ca516

At load time, applications still loads the ARM64X forwarder onnxruntime.dll. In an ARM64 process, that forwarder dll will further load the native ARM64 onnxruntime_arm64.dll; otherwise, the x64 onnxruntime_amd64.dll will be loaded, both the ARM64 and x64 dlls are happy.

The onnxruntime_arm64.dll and onnxruntime_amd64.dll are essentially aliases of their native counterparts, but we cannot directly rename existing native dlls in windows build. The reason is about PDB binplacing. If you simply rename a dll, the PDB name embedded in the dll is still unchanged. So you can imagine that if we just rename the native dlls in ARM64 windows build, there will be two renamed native dlls, onnxruntime_arm64.dll and onnxruntime_amd64.dll, sharing the same PDB name onnxruntime.pdb. When binplacing happens (basically moving dll and pdb from os\obj to os\bin), one PDB will overwrite the other. As a result, we either lose the PDB for the ARM64 dll, or the x64 dll.

That’s why we are asking to change the build pipeline to execute the link commands two extra times to produce onnxruntime_arm64/amd64.dll with different pdb names. You don’t need to do the compilation twice, but just the link. See here for an example: https://microsoft.visualstudio.com/DefaultCollection/Xbox/_git/Xbox.ShaderCompiler.WinTools/pullrequest/5291717

Related work items: #31925159
2021-03-17 18:43:21 +00:00
Tiago Koji Castro Shibata
bc3aea4be0 Capitalize DLL name 2021-03-17 11:01:14 -07:00
Tiago Koji Castro Shibata
4f5d6a0e4d Add ARM64X forwarder libs 2021-03-17 10:35:37 -07:00
Thiago Crepaldi
335edaa2c4
Merge pull request #6973 from microsoft/thiagofc/merge-ortmodule-into-master
Introduce ORTModule training API to ONNX Runtime
2021-03-17 10:30:06 -07:00
Chen Fu
03885af5a0
Adding prepacking to QLinearMatMul (#6980)
Reuse the same prepacking logic in mat mul integer, to enable prepacking weight for QLinearMatMul. Currently only prepacking 2D matrix weights
2021-03-17 09:28:24 -07:00
Tracy Sharpe
90642e7eac
MLAS: more code cleanup (#7036)
Change int32_t->ptrdiff_t when interacting with the threadpool.
Migrate more code from MlasMaskMoveAvx->MlasMaskMoveTableAvx.
Update more code to use FUNCTION_ENTRY macro.
2021-03-17 09:22:55 -07:00
jeyblu
8e0970a020
dnnl format tag fix (#6943) 2021-03-17 00:24:12 -07:00
Guoyu Wang
0f9383e583
[NNAPI EP] Add support of QlinearAveragePool (#6915)
* [NNAPI EP] Add support of QlinearAveragePool

* Merge master and modify UT and fix some code issues after running UT
2021-03-17 00:08:54 -07:00
Ryan Hill
a0fdabd23f
Rename all of the ONNX_NAMESPACE types for shared providers to be back in the ONNX_NAMESPACE with their original names. (#7034) 2021-03-16 21:18:50 -07:00
Tianlei Wu
73d085ccdd
add slow test (#7035) 2021-03-16 20:49:51 -07:00
Thiago Crepaldi
3348b8485f Post merge update for ORTModule
Changes include:
* Revert Event Pool changes
* Add copyright and revert unrelated changes
* Add DLPack as submodule and remove to_dlpack and from_dlpack from public API
* Update golden numbers for DHP Parallel tests
* Update ORTTrainer unit test numbers
* Rollback to DLPack v0.3
* Disable flaky test
* Update third party notices and CG manifest file
* Minor refactoring of ORTValue API
2021-03-16 20:11:59 -07:00
Changming Sun
ed2d441a2e
Update ORT server build pipeline (#7030)
1. Migrated it to Ed's new docker build script
2. Use python 3.6 instead, because it is the default one in ubuntu 18.04
3. Move the "pip install" command to the docker image build stage(instead of when running the image)
2021-03-16 18:02:09 -07:00
stevenlix
2e38bf5e23
add TensorRT configuration to OrtProviderOptions (#6979)
* add TensorRT configurations in provider options

* Update ort_test_session.cc

* Update tensorrt_execution_provider.cc

* Update onnxruntime_pybind_state.cc

* Update main.cc
2021-03-16 17:16:28 -07:00
Ori Levari
783acb144f
Ignored return value SDL bug fix (#6451) 2021-03-16 15:00:08 -07:00
Changming Sun
2361cb99b6
Remove CentOS CI pipeline (#6997) 2021-03-16 10:55:03 -07:00
Tiago Koji Castro Shibata
975e4efb8a
Package ARM artifacts (#6805) 2021-03-16 10:12:48 -07:00
Hariharan Seshadri
3f0e50f14d
Cleanup in RoiAlign (#7012) 2021-03-16 07:21:57 -07:00
Jinsong Ji
087d96200d
HIP_CLANG_FLAGS replaces HIP_HCC_FLAGS for ROCm later than 4.0 (#6955)
* HIP_CLANG_FLAGS replaces HIP_HCC_FLAGS for ROCm later than 4.0

HIP_HCC_FLAGS was deprecated in ROCm4.x
2021-03-15 23:28:00 -07:00
Tracy Sharpe
5480f8dd1d
MLAS: misc cleanup (#7013)
Miscellaneous changes to synchronize the style used over time:

Remove unneeded PFN types in favor of FN*.
Switch more functions over to using the common FUNCTION_ENTRY macro.
Switch logistic/tanh kernels over to the style used in TransKernelFma3.asm.
2021-03-15 18:24:18 -07:00
Ye Wang
4e670f7ab1
Support larger hidden size in Attention Cuda kernel (#7002)
* Support larger hidden size in Attention Cuda kernel

* Update attention_transpose.cu

* review comments

* fix typo and add check in quantization

* update readme
2021-03-15 15:46:10 -07:00
Hariharan Seshadri
27ac88201a
Support a CPU kernel for Celu (#6995) 2021-03-14 20:37:40 -07:00
Nat Kershaw (MSFT)
d0cca35308
Add README for docs (#6626)
* Add README for docs

* Add section on contributing to docs to CONTRIBUTING.md
2021-03-12 15:14:40 -08:00
Edward Chen
e5e922ec1e
Fix some warning option override warnings from dependencies. (#6983) 2021-03-12 11:37:15 -08:00
sfatimar
4c9ccb0f1a
[OpenVino] getcapability design (#6863)
* get capability design refactor

Co-authored-by: sfatimar <sahar.fatima@intel/com>
Co-authored-by: MaajidKhan <n.maajidkhan@gmail.com>
2021-03-12 11:18:33 -08:00
Changming Sun
4161758058
Remove openmp related packaging pipeline (#6991)
1. Remove openmp related packaging pipelines and build jobs.
2. Set continueOnError to true for the TSAUpload tasks. Their service is unstable recently.
3. Update Ubuntu 16 docker images to Ubuntu 18, in prepare for getting C++17 support
4. Cherry-pick the changes in 1.7.1 to the master: updating CFLAGS/CXXFLAGS to strip out debug symbols
2021-03-12 10:02:59 -08:00
Shucai Xiao
c588d5d13a
Add rocm execution provider to prover_list (#6306)
* code changes to add rocm ep to ep_list
2021-03-12 07:51:08 -08:00
Alberto Magni
031587814b
Add support to save onnx graph with external initializers file. (#6911)
Add functionality to the Graph class to be dumped to protobuf using an external binary file for the float initializers.

This change is meant to avoid hitting the 2GB protobuf limit when dumping large graphs.
This limit was particularly easy to exceed when dumping graphs after auto-diff.
The use of the external file is limited to initializers larger than a user-specified threshold.
This gives the possibility to users to include in the onnx file shape constants used by Reshape and Transpose used by Shape Inference.
2021-03-12 09:15:25 +00:00
Hariharan Seshadri
12b5ab3bab
Update CUDA custom op unit tests to account for recent ORT change (#6971) 2021-03-11 22:22:45 -08:00
Xavier Dupré
694389a85d
Automate generation of python documentation (#6909)
Co-authored-by: xavier dupré <xavier.dupre@gmail.com>
2021-03-11 19:02:45 -08:00
baijumeswani
f7df2f805b
Resolve HTTP Error 503: Service Unavailable for MNIST dataset 2021-03-11 13:53:54 -08:00
Edward Chen
aa60a8368f
Update type reduction operator type usage processors set. (#6976) 2021-03-11 09:22:53 -08:00
Ye Wang
b57a85d863
Support symbolic shape infer in transformers tool (#6899)
* fusion support runtime edge shape checking

* trim ctor

* add test

* fix

* Update test_shape_infer_helper.py

* use torch input size as dynamic axis hints

* check dir

* update

* support longformerattention

* update and add support for bert ops

* trim

* review comments

* review comments
2021-03-10 21:37:12 -08:00
Edward Chen
f4796e1953
Enable type reduction for Range, ReverseSequence, ScatterND, Split, and Unique CPU kernels. (#6963) 2021-03-10 16:20:25 -08:00
Chen Fu
4a4488baae
Release buffers for prepacked tensors (#6820)
Unsolved problems:

1. One test failure was caused by a bug in Cudnn rnn kernels, when they can allocate a buffer and partially initialize it, the garbage data near tail of the buffer caused problem in some of the hardware. To attack this problem in a broader sense, should we add code in our allocators, and during a memory fuzzing test, fill an allocated buffer with garbage before returning to the caller?


2. Prepacking is used more widely than we know. For instance, Cudnn rnn kernels also cache their weights. They mix several weight tensors together into a single buffer, and never touch the original weight tensor anymore. This is the same idea with pre-pack, but they didn't override the virtual function, and they never tried to release those weight tensors, leading to memory waste. It also seems to me that there are some other kernels have similar behavior. Wonder how much memory we can save if we try to cleanup those too.

3. Turning off memory pattern planning does increase memory fragmentation, leading to out of memory error in some training test cases. Perhaps we can revisit the idea of pushing kernels-creation stage earlier, and then during initializer deserialization, we only avoid tracing those that will be prepacked.
2021-03-10 14:07:20 -08:00
Nick Feeney
50973de1a2 Merged PR 5691446: QLinear Graph Support
Enables Graph Support for QLinearConv, ConvInt, QLinearMatMul, and MatMulInt

Related work items: #31249591
2021-03-10 20:46:40 +00:00
Guoyu Wang
2f307dd223
Fix possible fd leak in NNAPI (#6966) 2021-03-10 11:20:08 -08:00
Thiago Crepaldi
89d450697b Introduce ORTModule training API to ONNX Runtime 2021-03-10 10:48:10 -08:00
Ori Levari
9f84819f32
Update onnxruntime_perf_test.exe to accept free dimension overrides (#6962)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-03-10 10:45:19 -08:00