Commit graph

4818 commits

Author SHA1 Message Date
baijumeswani
c5aeaa9419
Support for unused model initializers (#7631)
* Support for unused model initializers

* Change graph_info.initializer* to sets
2021-05-11 12:26:56 -07:00
Sunghoon
88d2fc8f1e
ONNX Runtime React Native Library (#7564)
* onnxruntime react native binding

* add react native backend

* fix lint comments

* fix react native backend for ios

* remove unnecessary files to check in

* move onnxruntime-common to devDependency

* create two podspec files for iphoneos and iphonesimulator

* revise README.md and add third party notices for react native

* rename a package

* rename a package and revise README

* add a license into package.json

* revise README and comments

* fix typo

* fix lint errors

* fix lint errors

* add a prepack script. touch index.tsx and App.tsx to resolve CI issue

* remove a unsupported tsx format from clang-format

* fix a type and add steps tp publish a react native npm package

* resolve comments

* fix clang format

* remove promise wrap. change prepack to typescript
2021-05-11 10:34:40 -07:00
Olivia Jain
29172d8f54
Setup EP Dashboard (#7321)
* setting up dashboard
* posting to ort dashboard
* creating separate docker file
* including common deps
* tracking latency over time
2021-05-11 10:33:39 -07:00
Guoyu Wang
ce8473a4ea
Add script to build fat iOS framework (#7607) 2021-05-11 09:46:24 -07:00
Scott McKay
d39db89fbb
Add info on some additional pytorch models that were added to the test models. No new operators are required. (#7644) 2021-05-11 19:48:28 +10:00
Scott McKay
5276bab268
Fail model loading if node input is a missing value (#7459)
* Add check for a node with an invalid input so we fail during model load. Without this we get a more cryptic failure in the allocation planner.

* Add handling for manually created subgraph where outer scope node arg names are in a different place.

* Update onnxruntime/core/graph/graph.cc

Co-authored-by: Pranav Sharma <prs@microsoft.com>

* Ignore Fused nodes when checking inputs are valid. DML EP will remove initializers it has moved across, so they're available when the node runs but are no longer part of the ORT Graph instance.

We have to fully resolve the graph before any node fusion happens, so the model was valid in the beginning (which is the main thing we are trying to validate).

* Skip check in training build. Rules for allowing an 'invalid' input are unknown for those scenarios.

* Only check the initial load for a training build.

Co-authored-by: Pranav Sharma <prs@microsoft.com>
2021-05-11 19:48:17 +10:00
Changming Sun
90c65ac171
Fix a bug in inference_session.cc (#7639) 2021-05-10 23:39:50 -07:00
Guoyu Wang
69d1db83ac
Enable bitcode for iOS by default (#7640) 2021-05-10 21:27:45 -07:00
satyajandhyala
9f69b2f291
Added InsertAndReduce strategy to PropagateCastOps transformation in addition to FloodFill strategy (#7454)
* Moved GraphTransformerConfiguration to a separate file and added strategy option to PropagateCastOps transformation.

* Added testing both FloodFill and InsertAndReduce stratigies for cast propagation.

* Added AddConsumer and RemoveConsumer functions to in graph.h for efficient graph editing.

* Added PropagateCastOps code documentation

* Added GraphTransformationConfiguration class hierarchy information

* Added RemoveInputOutputUpDownCasts
2021-05-10 20:46:28 -07:00
baijumeswani
08fbfe9607
Resolve issue where a registered buffer was parsed incorrectly as a user input (#7617) 2021-05-10 19:04:27 -07:00
Pranav Prakash
a684e9aa52
Add pre-training transform to convert BatchNorm to BatchNormInternal (#7539)
* Add transformer for BatchNorm -> BN Internal

* Add test for BN replacement transformer
2021-05-10 15:13:59 -07:00
ankurverma85
de4089f8cb
GCC11/Libstdc++11 Compilation fixes (#7599)
Authored-by: Ankur Verma <ankurv@microsoft.com>
2021-05-10 12:50:08 -07:00
Tracy Sharpe
16297a8e61
Implement NCHWc Upsample linear mode (#7623)
Extend the existing NCHWc Upsample operator to support linear modes too.
2021-05-10 12:16:16 -07:00
Yulong Wang
ec885040ef
[js] specify correct config for terser (#7627)
* add copyright banner

* fix worker loading failure

* add a section in document for formatter and linter
2021-05-10 11:50:39 -07:00
Xueyun Zhu
c5d28097e8
[js/web] adding conv fuse logic (#7604)
* adding conv fuse logic

* fixing merge

* fix file name in kebab case

* fix lint error
2021-05-10 11:41:50 -07:00
baijumeswani
88c95ef06b
Support for primitive types in ortmodule (#7588) 2021-05-10 10:59:47 -07:00
Hariharan Seshadri
4b691a5c0d
Add ability for memory arenas to "shrink" periodically (#7284) 2021-05-08 07:53:21 -07:00
Ye Wang
803837df63
Add 4dmask support for attention cuda kernel (#7591)
* checkin

* add 4dmask support in attention cuda op

* trim

* add comments

* fix build/test error

* review comments and add tests

* sync doc

* review comments

* minor change
2021-05-07 20:17:29 -07:00
Tianlei Wu
55c086b664
symbolic shape inference improvements for contrib ops (#7606)
* add EmbedLayerNormalization
* use onnx shape inference for Unsqueeze
* Fix type warning in Attention
2021-05-07 17:03:24 -07:00
Edward Chen
5a5fec0452
Fix logs getting skipped in single-line conditionals. (#7589)
Fix an issue where a log message got skipped.

A log call like this:
```
LOGS(...) << "message";
```
expands to something like this:
```
if (<output enabled>)
  logging::Capture(...).Stream() << "message";
```

This if statement without brackets is handy for logging arbitrary arguments with the `<<` operator. However, it has other drawbacks like possibly associating with a subsequent `else`.

```
if (cond)
  LOGS(...) << "a";
else
  <do something> // not run when !cond

// equivalently:
if (cond)
  if (<output enabled>)
    logging::Capture(...).Stream() << "a";
  else
    <do something> // not run when !cond
```

Updated the logging macros to handle this case by replacing `if (<enabled>) logging::Capture(...).Stream()` with `if (!<enabled>) {} else logging::Capture(...).Stream()`.

Thanks @tlh20 for the idea for the fix!
2021-05-07 15:40:47 -07:00
Derek Murray
e91bdbde20
Add myself to CODEOWNERS for ORTModule python code (#7453) 2021-05-07 15:35:45 -07:00
Changming Sun
41e370c2b3
Update protobuf to 3.16 (#7616) 2021-05-07 14:09:23 -07:00
Tixxx
3c39fcc1fa
[js/web] port fixes for packed concat over to ort repo (#7605)
* port fixes for packed concat over to ort repo

* fix format
2021-05-07 13:04:53 -07:00
Yulong Wang
bdefc6c4d8
[js/web] support multi-thread for wasm backend (#7601) 2021-05-07 12:12:37 -07:00
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