Commit graph

4794 commits

Author SHA1 Message Date
stevenlix
8ab0deceed
Add DLA support to TensorRT EP (#7532)
* Add DLA to TensorRT EP, enable device_id options in pybind, fix cycledetection issue

* fix format

* remove unecessary passing by pointer

* fix issue
2021-05-07 10:31:42 -07:00
Scott McKay
9fc4116d51
Use ASSERT_STATUS_OK so the error message is output if there's a failure. (#7515) 2021-05-07 20:23:34 +10:00
Vincent Wang
0c91b643fe
Bugfix for Scatter and GatherElementsGrad (#7593)
* bugfix for scatter and gather elements grad

* resolve comments
2021-05-07 14:02:26 +08:00
Maajid khan
cea0ea1591
[OpenVINO-EP] Remove support for 2020.4 (#7580)
* [OpenVINO-EP] Remove support for 2020.4

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

* Minor changes added

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

* Minor changes added

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

Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2021-05-06 19:20:18 -07:00
Pranav Sharma
bdb2ed7864
Revert "Add log to allow serving platforms to quantify ORT usage. (#7476)" (#7598)
This reverts commits da5c926, 4186233 and be2a304.
2021-05-06 16:21:32 -07:00
Tianlei Wu
d88da44066
Allow flexible order of Add inputs in Attention fusion (#7565) 2021-05-06 09:43:28 -07:00
ashbhandare
4896744638
Improve CPU node placement logic to avoid Memcpys (#7427)
* Modify CPU fallback logic

* Review comments, failing test

* Add test for topological order

* review comment

* Fix test for amd ci

* fix build

* Fix amd test
2021-05-06 09:39:34 -07:00
Scott McKay
097bab8d1e
Cleanup a change to ExecutionFrame a little (#7576)
* Reduce the binary size growth from this change. Minimal build grew by 7KB from this checkin.

Firstly simplify the checking logic a little. Same checks are still done - just without using an extra layer of helpers.

The issue being addressed by the original change only applies if you have a graph output where the shape wasn't able to be inferred. e.g. Reshape node with dynamic input causes downstream shapes to be unknown. If that is not the case, MergeShapeInfo in graph.cc would have resolved any differences between a specified output shape and the inferred output shape during Graph::Resolve.

The issue does not apply to the execution frame used by the optimizer as  the only time it would create a graph output is if it could constant fold all the way through, so MergeShapeInfo would have handled any difference in that case as well.

Due to these considerations, wiring a logger in at the IExecutionFrame level isn't necessary if VerifyOutputSizes optionally overridden by an implementation that cares.

* Address PR comments
2021-05-06 19:29:34 +10:00
Pranav Sharma
be2a3046fe
Disable telemetry log for training builds (#7585) 2021-05-06 00:03:19 -07:00
Maajid khan
5413eaa5e4
Additional cmake changes for OpenVINO build (#7579)
->unsetting the CMAKE_MAP_IMPORTED_CONFIG that was
set for OpenVINO EP for Relwithdebinfo build on
windows.

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

Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2021-05-05 23:54:53 -07:00
Edward Chen
830f0b45d0
Update Objective-C API (#7567)
Update Objective-C API to be more usable from Swift. E.g., to allow conversion from Objective-C methods with trailing NSError** parameter to throwing Swift methods.
Update CMake Objective-C framework setup.
2021-05-05 15:56:55 -07:00
baijumeswani
f3a70f1aec
Ignore invalid input argument to install_os_deps.sh (#7566) 2021-05-05 14:33:31 -07:00
Zhang Lei
9465948715
Quantization tools using one more extra_options on interface. (#7293)
handle nnapi special sigmoid options.
2021-05-05 13:51:50 -07:00
Changming Sun
a284eede64
Fix Linux CPU pipeline (#7584) 2021-05-05 13:26:10 -07:00
Ye Wang
8a9ddfe963
Longformer Attention non-determinism issue fix (#7574)
* Fix run-to-run not deterministic bug.

* Remove non-deterministic logic in softmax

* Fix value diff when removing non-deterministic issue.

Co-authored-by: Lei Zhang <zhang.huanning@hotmail.com>
2021-05-05 09:54:25 -07:00
Derek Murray
94c97ac8c2
Fix compiler warnings treated as errors in GistEncodeDecode. (#7568)
* Fix compiler warning in GistEncodeDecode.

* Fix other use of member variable.

* Make `compression_type_` const.

* Change floor to floorf in CUDA code.

* Statically cast size_t to int in GIST CUDA kernels

* Add explicit cast to `long` in gist.cc

Co-authored-by: Derek Murray <demurra@microsoft.com>
2021-05-05 09:05:11 -07:00
Sheil Kumar
91985ab03d
add use_dml (#7569)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-05-05 08:55:13 -07:00
Xavier Dupré
2f0479780e
Improves NonMaxSuppression on CPU (#7557)
* improves non max suppression
* use pointer instead of boxes
2021-05-05 09:14:40 +02:00
Xavier Dupré
ade6ed51eb
Speed up Reduce operators for consecutive reduced axes (#7206)
* Improves Reduction for three specific configurations
* Support ReduceMean
* add ReduceMax, ReduceMin
* refactoring
2021-05-05 09:14:00 +02:00
Pranav Prakash
053bada30f
Add support for setting shape inference function on fused nodes (#7007)
* Add support for setting shape inference function on fused nodes
* Add test for fused node shape inference
2021-05-05 13:32:07 +10:00
Rachel Guo
d8cf960412
Add android test app to validate Java API for ORT-Mobile Android (#7477)
* test

* [gwang] make cmake compile work

* [gwang] enble build apks

* some build update

* add simple sigmoid test android project and cmake

* add build.py

* refine and remove unused import lib

* address CR comments

* remove unnecessary files

* add README.md

* minor update

* remove

* minor change

* fix ci failure and minor update

* fix typo in project folder

* remove

* remove and minor update

* refine

* minor fix

* fix

* fix typo

* add gradle spotlessApply task to fix CI failure

* fix

* enable spotlessApply in build gradle

* revert some changes

* minor fix

* run spotless apply for format

* address CR comments and fix CI version and format

* refine

* Refine

* address comments

* refine

* refine

* modify

* reformat

* resolve version conflicts

* minor update

* minor update

* address comments

* minor update

Co-authored-by: Guoyu Wang <wanggy@outlook.com>
2021-05-04 15:39:14 -07:00
Zhang Lei
f6cefc92e2
Add quantized value map after quantize input node added. (#7558) 2021-05-04 15:27:56 -07:00
Sergii Dymchenko
a647da3e1a
Fix 2 input Gemm grad (#7561)
* Add test for 2 input Gemm grad.

* Fix 2 input Gemm grad.
2021-05-04 12:00:14 -07:00
harshithapv
d812354ebd
Tile grad fix (#7556)
* tile grad fix

* code clean up
2021-05-04 11:16:26 -07:00
Guoyu Wang
e05528a365
Update Android AAR packaging pipeline script (#7559)
* update android package pipeline

* update shell script

* update script

* add kMSExperimentalDomain to reduction
2021-05-04 11:13:33 -07:00
Guoyu Wang
71ff6ff2ec
Disable NNAPI support for dynamic input shape, add warning logs (#7439)
* disable nnapi for graph with dynamic input shape

* Add warning for multiple paritions

* minor update

* update the message logging

* Fix coreml ci failure
2021-05-04 11:09:23 -07:00
Fanny Nina Paravecino
c3c4db2c1b
Upgrade GIST memory compression nodes, kernels, optimizer rule, and cli (#6262)
* Add gist nodes, kernels, optimizer rule, and cli

* Add Gist CUDA kernels

* Added/updated gist compression cli to bert, gpt2, mnist

* Fix decode priority generator for large models

* Fix hardcoded decode priority generator, update gist training test

* Fix incomplete if/else sequence for CI build

* Added MSFP15 for gist compression type

* fix Msfp15 bug

* Resolved azure pipeline errors - unsupported ORT_RETURN macro format, cudastream argument

* Resolved hardcoded cudastream argument, Pack8 zero error

* Resolved PR comments - except gist tests

* Added TypeInference to Gist Nodes, To attribute to Gist Decoder, Updated Gist Test Cases

* Reverted error in merge commit

* Updated logger usage in Gist rule, Updated GistPackMSFP15 compressed tensor's explaination

* Converted onnxruntime::make_unique to std::make_unique based on PR 7502

Co-authored-by: Fanny Nina Paravecino <faninapa@microsoft.com>
Co-authored-by: Aayush Ankit <aayushankit@microsoft.com>
Co-authored-by: Aayush Ankit <Aayush-Ankit@users.noreply.github.com>
Co-authored-by: Fanny Nina Paravecino <fanny.nina@microsoft.com>
2021-05-04 10:33:35 -07:00
Sherlock
c1ed647170
ORTModule enable run_symbolic_shape_infer by default (#7423)
* ORTModule enable run_symbolic_shape_infer by default

* Fix UTs by replacing Relu with Softmax

Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-05-04 10:08:14 -07:00
Chi Lo
a94a893d5e
Update SessionOptions.cs (#7540)
Fix compile warning
2021-05-04 01:51:35 -07:00
Scott McKay
594dde2647
Validate that the conversion script from the python package can be used to convert models. (#7517) 2021-05-04 16:25:04 +10:00
sfatimar
898fff702c
compatibility was broken for myriad config parameter (#7349)
Co-authored-by: MaajidKhan <n.maajidkhan@gmail.com>
Co-authored-by: sfatimar <sahar.fatima@intel/com>
Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2021-05-03 21:13:12 -07:00
Tianlei Wu
3c9ece4a11
[transformers optimizer] catch symbolic shape inference exception and clean up (#7560)
catch symbolic shape inference exception.
no prune graph when there is inner graph (Loop/If/Scan)
add an wrapper for numpy_helper.to_array so that we can debug onnx graph without external data
remove fuse_mask that is not used any more in onnx_model_bert_tf.py
2021-05-03 20:42:13 -07:00
George Wu
faea7a222d
linux trt package pipeline (#7537) 2021-05-03 19:14:20 -07:00
Yulong Wang
8eaa4c33e2
[js] fix library bundling and some trivial improvement (#7550)
* [js] fix library bundling

* fix filename in code comments
2021-05-03 18:31:55 -07:00
Tianlei Wu
731f9e5033
Fix symbolic shape inference for Unsqueeze (#7555)
* fix Unsqueeze shape inference
* add tests
2021-05-03 18:06:59 -07:00
Yulong Wang
418623355a
disable logging for WASM in inference session ctor (#7545) 2021-05-03 16:01:41 -07:00
Dmitri Smirnov
8b6602ae68
Refactor provider test utils to prepare for expansion. (#7538)
Refactor provider test utils to prepare for expansion.
  Do not sort Tensors in place. This is reasonably rare.
2021-05-03 15:56:07 -07:00
baijumeswani
cab84d902e
Install and use conda on ortmodule CI pipelines (#7530)
* Install and use conda on ortmodule CI pipelines

* Update build script to install onnxruntime wheel before running unit tests

* Remove python 3.5 from install_python_deps

* Pinning deepspeed version to 0.3.15
2021-05-03 15:52:22 -07:00
Yufeng Li
ad15811ade
Add QDQ support for MatMulIntegerToFloat, Gather and Transpose (#7500)
* add QDQ support for MatMulIntegerToFloat, Gather and Transpose
2021-05-03 15:51:25 -07:00
Scott McKay
830d9e54dd
Add script to dump initializer, NodeArg, Node and subgraph info from an ORT format model (#7516) 2021-05-04 08:34:35 +10:00
Yulong Wang
3600c3e66e
[js/web] integrate latest changes from onnxjs (#7535)
* [js/web] integrate latest changes from onnxjs

* apply ESLint rules: filename-case and header

* remove filename-case rule for wasm .d.ts
2021-05-03 15:03:25 -07:00
sumitsays
9c0e5954cb
Output Tensor Shape Validation b/w ONNX inference and ORT (#7252)
* Adding Output Shape Validation for ORT-CPU execution flow

* Skipping validation check in-case output is not a tensor. Fixed conv_transpose test. Ignoring pad and reduction test

* Comparison b/w signed and un-signed int. Removed const for a primitive variable

* Commented the un-used test function signature

* Removed exception instead logging warning. Because there are lots of ORT tests which are failing because of this validation

* Fixed warning condition and test

* Fixed test and addressed comment on the PR

* Output shape verification will happen only for final output nodes of the model

* Changed variable name from camel case to underscore style

* Enable the tests as the validation failure will now logs warning instead of throwing an exception

* Adding Output Shape Validation for ORT-CPU execution flow

* Resolve merge conflict

* Comparison b/w signed and un-signed int. Removed const for a primitive variable

* Commented the un-used test function signature

* Removed exception instead logging warning. Because there are lots of ORT tests which are failing because of this validation

* Fixed warning condition and test

* Fixed test and addressed comment on the PR

* Output shape verification will happen only for final output nodes of the model

* Changed variable name from camel case to underscore style

* Enable the tests as the validation failure will now logs warning instead of throwing an exception

* Remove duplicate function "GetLogger()"

Remove duplicate function "GetLogger()"

* Fixed typo in method name TestConvTransposeOpInitializer

Fixed typo in method name "TestConvTransposeOpInitializer"

Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-05-03 12:56:09 -07:00
sumitsays
e344a583b0
updated sampleTolerance of model fp16_inception_v1 for GPU execution provider (#7533)
Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-05-03 12:08:31 -07:00
G. Ramalingam
b0a3b501fe
Add function body for Gelu and FastGelu (#7496)
* LayerNorm function body v1

* LayerNorm function body

* layernorm function test

* Minor fixes

* Fix signed unsigned comparison

* Move contrib ops test

* Handle optional output parameters

* Add test case for optional outputs

* Handle float16 random generation

* Add function body to Gelu and FastGelu

* Add FastGelu test

* Fix comments

* Include cmath
2021-05-03 12:00:37 -07:00
Yulong Wang
7079dfb93d
[wasm] fix and unify webassembly target name (#7549) 2021-05-03 10:37:25 -07:00
Tim Harris
2e09d9921a
"Sticky" allocation of worker threads (#7551)
[ PR previously merged as https://github.com//pull/7372, then reverted pending investigation of lost-wake-up issue seen with ParallelExecutor. Issue was a missing test for new work pushed to thread concurrent with a worker blocking. Change from 7372 is the addition of: https://github.com/microsoft/onnxruntime/blob/tiharr/dev-sticky-4/include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h#L1473-L1492 ]

Description: This change updates the heuristics used when a thread selects which worker threads to push work to on entering a parallel loop. Previously, worker threads would maintain a best-effort bitmap of "good worker hints" indicating the threads that were likely to be spinning waiting for work. This change uses a simpler heuristic where a thread records which workers ran its previous loop, and then re-submits its next loop to those same workers. The aim is to retain affinity between a thread and a set of workers, and to avoid maintaining the "good worker hints" bitmaps.

Motivation and Context: Profiling suggested that maintaining the "good worker hints" was taking unexpected time, particularly on NUMA systems. In addition, when running many concurrent workloads, the hints did not provide a way to help retain locality of workers and hence data in caches. Testing to confirm no regressions on microbenchmark (./build/Linux/Release/onnxruntime_benchmark --benchmark_filter=BM_ThreadPoolParallelFor) and on Linux mobilenet_v1_1.0_224.onnx, comparing p50 and p99 with vs without this change:

1 concurrent:
p50 0.0172s vs 0.0181s
p99 0.0204s vs 0.0216s

2 concurrent:
p50 0.0172s vs 0.0181s
p99 0.0213s vs 0.0221s
2021-05-03 18:28:13 +01:00
Sherlock
6714f2f85d
Improve tol value logging in ORTModule test (#7544)
Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-05-03 09:43:40 -07:00
Ryota Tomioka
d1cb8c9dc9
Support negative indices and fix bound checking in symbolic shape inference for Slice (#7401)
* Use positivity everywhere; handle negative index in Slice

* limit positivity to inputs

* make handle_negative_index private

* strengthen sympy comparison

* further strengthen compariso
n and a minor refactoring

* Add flip test

* Fall through if -int_max in handle_negative_index()

* minor fix for infer_Concat to include initializers

* Add more tests

* use simplify

* more tests
2021-05-03 09:07:55 -07:00
Sheil Kumar
8e3cdf0452
Use unicode apis for loadlibrary (#7523)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-05-03 07:24:40 -07:00
Yulong Wang
add4e4225b
[js/web] fix pacakge metadata of onnxruntime-web (#7543) 2021-05-02 13:26:07 -07:00