Commit graph

728 commits

Author SHA1 Message Date
Scott McKay
0ad940027c
Use ConstPointerContainer for Node::ImplicitInputDefs() for better consistency with InputDefs() and OutputDefs(). (#894) 2019-05-01 14:22:28 +10:00
Tomasz Dołbniak
df513c7fe6 Perform shallow clone for nGraph (#938) 2019-04-30 18:38:33 -07:00
nivas-x86
7f14326dab nGraph EP documentation (#939) 2019-04-30 18:38:09 -07:00
tmccrmck
1978b3c953 Add an HTTP server for hosting of ONNX models (#806)
* Simple integration into CMake build system

* Adds vcpkg as a submodule and updates build.py to install hosting dependencies

* Don't create vcpkg executable if already created

* Fixes how CMake finds toolchain file and quick changes to build.py

* Removes setting the CMAKE_TOOLCHAIN_FILE in build.py

* Adds Boost Beast echo server and Boost program_options

* Fixes spacing problem with program_options

* Adds Microsoft headers to all the beast server headers

* Removes CXX 14 from CMake file

* Adds TODO to create configuration class

* Run clang-format on main

* Better exception handling of program_options

* Remove vckpg submodule via ssh

* Add vcpkg as https

* Adds onnxruntime namespace to call classes

* Fixed places where namespaces were anonymous

* Adds a TODO to use the logger

* Moves all setting namespace shortnames outside of onnxruntime namespace

* Add onnxruntime session options to force app to link with it

* Set CMAKE_TOOLCHAIN_FILE in build.py

* Remove whitespace

* Adds initial ONNX Hosting tests (#5)

* Add initial test which is failing linking with no main

* Adds test_main to get hosting tests working

* Deletes useless add_executable line

* Merge changes from upstream

* Enable CI build in Vienna environment

* make hosting_run*.sh executable

* Add boost path in unittest

* Add boost to TEST_INC_DIR

* Add component detection task in ci yaml

* Get tests and hosting to compile with re2 (#7)

* Add finding boost packages before using it in unit tests

* Add predict.proto and build

* Ignore unused parameters in generated code

* Removes std::regex in favor of re2 (#8)

* Removes std::regex in favor of re2

* Adds back find_package in unit tests and fixes regexes

* Adds more negative test cases

* Adding more protos

* Fix google protobuf file path in the cmake file

* Ignore unused parameters for pb generated code

* Updates onnx submodule (#10)

* Remove duplicated lib in link

* Follow Google style guide (#11)

* Google style names
* Adds more 
* Adds an additional namespace
* Fixes header guards to match filepaths

* Consume protobuf

* Unit Test setup

* Json deserialization simple test cases

* Split hosting app to lib and exe for testability

* Add more cases

* Clean up

* Add more comments

* Update namespace and format the cmake files

* Update cmake/external/onnx to checkout 1ec81bc6d49ccae23cd7801515feaadd13082903

* Separate h and cc in http folder

* Clean up hosting application cmake file

* Enable logging and proper initialize the session

* Update const position for GetSession()

* Take latest onnx and onnx-tensorrt

* Creates configuration header file for program_options (#15)

* Sets up PredictRequest callback (#16)

* Init version, porting from prototype, e2e works

* More executor implementation

* Adds function on application startup (#17)

* Attempts to pass HostingEnvironment as a shared_ptr

* Removes logging and environment from all http classes

* Passes http details to OnStart function

* Using full protobuf for hosting app build

* MLValue2TensorProto

* Revert back changes in inference_session.cc

* Refactor logger access and predict handler

* Create an error handling callback (#19)

* Creates error callback

* Logs error and returns back as JSON

* Catches exceptions in user functions

* Refactor executor and add some test cases

* Fix build warning

* Add onnx as a dependency and in includes to hosting app (#20)

* Converter for specific types and more UTs

* More unit tests

* Update onnx submodule

* Fix string data test

* Clean up code

* Cleanup code

* Refactor logging to use unique id per request and take logging level from user (#21)

* Removes capturing env by reference in main

* Uses uuid for logging ids

* Take logging_level as a program argument

* Pass logging_level to default_logging_manager

* Change name of logger to HostingApp

* Log if request id is null

* Update GetHttpStatusCode signature

* Fix random result issue and camel-case names

* Rollback accidentally changed pybin_state.cc

* Rollback pybind_state.cc

* Generate protobuf status from onnxruntime status

* Fix function name in error message

* Clean up comments

* Support protobuf byte array as input

* Refactor predict handler and add unit tests

* Add one more test

* update cmake/external/onnx

* Accept more protobuf MIME types

* Update onnx-tensorrt

* Add build instruction and usage doc

* Address PR comments

* Install g++-7 in the Ubuntu 16.04 build image for vcpkg

* Fix onnx-tensorrt version

* Check return value during initialization

* Fix infinite loop when http port is in use (#29)

* Simplify Executor.cc by breaking up Run method (#27)

* Move request id to Executor constructor

* Refactor the logger to respect user verbosity level

* Use Arena allocator instead of device

* Creates initial executor tests

* Merge upstream master (#31)

* Remove all possible shared_ptrs (#30)

* Changes GetLogger to unique_ptr

* Reserve BFloat raw data vector size

* Change HostingEnvironment to being passed by lvalue and rvalue references

* Change routes to getting passed by const references

* Enable full protobuf if building hosting (#32)

* Building hosting application no longer needs use_full_protobuf flag

* Improve hosting application docs

* Move server core into separate folder (#34)

* Turn hosting project off by default (#38)

* Remove vcpkg as a submodule and download/install Boost from source (#39)

* Remove vcpkg

* Use CMake script to download and build Boost as part of the project

* Remove std::move for const references

* Remove error_code.proto

* Change wording of executable help description

* Better GenerateProtobufStatus description

* Remove error_code protobuf from CMake files

* Use all outputs if no filter is given

* Pass MLValue by const reference in MLValueToTensorProto

* Rename variables to argc and argv

* Revert "Use all outputs if no filter is given"

This reverts commit 7554190ab8e50ba6947648c2f3e2a3d4d9606ce0.

* Remove all header guards in favor of #pragma once

* Reserve size for output vector and optimize for-loop

* Use static libs by default for Boost

* Improves documentation for GenerateResponseInJson function

* Start Result enum at 0 instead of 1

* Remove g++ from Ubuntu's install.sh

* Update cmake files

* Give explanation for Result enum type

* Remove all program options shortcuts except for -h

* Add comments for predict.proto

* Fix JSON for error codes

* Add notice on hosting application docs that it's in beta

* Change HostingEnvironment back to a shared_ptr

* Handle empty output_filter field

* Fix build break

* Refactor unit tests location and groups

* First end-to-end test

* Add missing log

* Missing req id and client req id in error response

* Add one test case to validate failed resp header

* Add build flag for hosting app end to end tests

* Update pipeline setup to run e2e test for CI build

* Model Zoo data preparation and tests

* Add protobuf tests

* Remove mention of needing g++-7 in BUILD.md

* Make GetAppLogger const

* Make using_raw_data_ match the styling of other fields

* Avoid copy of strings when initializing model

* Escape JSON strings correctly for error messages (#44)

* Escape JSON strings correctly

* Add test examples with lots of carriage returns

* Add result validation

* Remove temporary path

* Optimize model zoo test execution

* Improve reliability of test cases

* Generate _pb2.py during the build time

* README for integration tests

* Pass environment by pointer instead of shared_ptr to executor (#49)

* More Integration tests

* Remove generated files

* Make session private and use a getter instead (#53)

* logging_level to log_level for CLI

* Single model prediction shortcut

* Health endpoint

* Integration tests

* Rename to onnxruntime server

* Build ONNX Server application on Windows (#57)

* Gets Boost compiling on Windows

* Fix integer conversion and comparison problems

* Use size_t in converter_tests instead of int

* Fix hosting integration tests on Windows

* Removes checks for port because it's an unsigned short

* Fixes comparison between signed and unsigned data types

* Pip install protobuf and numpy

* Missing test data from the rename change

* Fix server app path (#58)

* Pass shared_ptr by const reference to avoid ref count increase (#59)

* Download test model during test setup

* Make download into test_util

* Rename ci pipeline for onnx runtime server

*  Support up to 10MiB http request (#61)

* Changes minimum request size to 10MB to support all models in ONNX Model Zoo
2019-04-30 18:21:23 -07:00
Hariharan Seshadri
6f5c28fd3a
Accomodate missing optional 'axes' when 'steps' is present in Slice op (#945)
* Accomodate missing optional axes when steps is present in Slice implementation

* PR feedback
2019-04-30 17:46:48 -07:00
Yufeng Li
62b340608c
Execute one task in current thread (#947)
Resnet50 takes 44.35 ms with the change, comparing to 50.94 ms without the change. The test environment is: Win 10, Intel i7-4790.
2019-04-30 16:20:54 -07:00
nivas-x86
3b0dda0aca nGraph: Avoid input and output data copies (#940) 2019-04-30 12:10:28 -07:00
Raymond Yang
01cd7eaca8 Bump up onnx version (#936)
* bump up onnx version
2019-04-30 08:44:32 -07:00
Changming Sun
2d00c62005 perf test: support more data types for the TF backend 2019-04-29 20:23:33 -07:00
Konstantinos Karanasos
1b7d1f2645
Convert constant folding to a transformer (#866) 2019-04-29 18:12:49 -07:00
Sergii Dymchenko
5bcd77e488 Use O_TRUNC when saving ONNX models to prevent possible file corruption. (#887) 2019-04-29 13:45:25 -07:00
Du Li
1658efd953
Adding Resize CUDA kernel (#869)
* Adding resize cuda kernel

* Fix a bug.

* Fix CI errors

* Fix CI issues.

* update onnx

* fix a linux CI issue.

* fix cuda kernels
2019-04-29 13:35:38 -07:00
Maik Riechert
ded7eeb033 make builds more robust (#906) (#932) 2019-04-29 12:58:20 -07:00
Du Li
8d6114038f
Adding cuda Greater kernel (#933) 2019-04-29 10:30:51 -07:00
Ke Zhang
f39a8d1f59
allow users to set graph inputs and outputs fully. (#905)
* allow users to set graph inputs and outputs fully.

* update

* update the comments of the APIs

* update

* remove commented-out codes.

* fix test failures.

* fix comments.

* adding more check to throw not support exception right now.
2019-04-29 15:58:39 +08:00
jignparm
bb58806872 Adding versioned dlls to tar/zip packages (#928)
* Adding versioned dlls to tar/zip packages

* fix syntax error

* fix version name of dylib

* minor fix in the target

* update pattern for versioned dylib files
2019-04-28 22:44:49 -07:00
Dmitri Smirnov
93d798b8ca Add locale configuration doc. 2019-04-27 21:16:49 -07:00
hariharans29
71ddba7254 Disable flaky model test in CUDA build 2019-04-27 21:15:20 -07:00
jignparm
861b9fda45
Add link to build within Nuget package (#926)
* Add link to build within Nuget package

* Update buildID to build uri

* add url prefix to build id
2019-04-27 13:41:20 -07:00
Hariharan Seshadri
06e0f7e3e7
Minor changes to support inclusion of x86 bits in the Nuget packaging pipeline (#916)
* initial commit

* More changes

* More changes

* Adding stuff back to the targets xml

* More changes v3

* More changes v4

* More changes v5

* More changes v6

* More changes v7

* More changes v9

* Disable CSharp tests for now

* More changes

* Revert file to same status

* Update props file for x86

* Change to usage of TargetArchitecture instead of PlatformTarget

* Update targets.xml

* Minor formatting nit fix

* Update based on PR comments
2019-04-27 00:41:26 -07:00
Konstantinos Karanasos
7a42ffd15f
Fix in Slice Elimination (issue #885) (#918)
Slice elimination should not be triggered when starts or ends is negative; small fix in op set domain validation. Fixes issue #885.
2019-04-26 21:04:29 -07:00
Ashwini Khade
90544ed766
bump version number for release (#911)
* bump version number for release

* + review comments
2019-04-26 16:28:16 -07:00
nivas-x86
b5ea3973c4 nGraph EP disable new quant tests (#920)
* Disable quant op test cases

* enable ngraph quant ops
2019-04-26 14:21:20 -07:00
Faith Xu
3812c881f7 Readme updates (#912)
* Updates

* Minor updates

* Updates

* Updates

* Add version link

* Update README.md
2019-04-26 13:55:26 -07:00
Raymond Yang
38f1f69432
Add a temporary bypass of artifacts permission issue (#921)
* Try using blob

* Try using blob

* Update working directory

* Update windows-build-tools-setup-steps.yml
2019-04-26 13:34:41 -07:00
Ryan Hill
5ed3db914e
Update custom op help (#914)
* Update AddingCustomOp.md
2019-04-26 11:22:46 -07:00
Bowen Bao
0cef3b53df Fix scatter assertion offset failure (#913) 2019-04-26 11:20:53 -07:00
Hector Li
8633e9ffda
Fix a issue that ort will crash if the model has subgraph created by controlflow ops like loop, if, scan. (#917)
Root cause:
The crash is caused by the null threadpool in the op. The op is inside the subgraph. theadpool is set on the session_state. However it doesn't pass it to the session_sate owned by subgraph.
Fix:
Pass the threadpool to the session_sate owned by subgraph when we create CreateSubgraphSessionState.
2019-04-26 10:57:06 -07:00
Du Li
da0f9bf9a4
fixing a bug in resize op (#910)
* fixing a bug in resize op

* Enable onnx tests

* merge master
2019-04-26 06:48:51 -07:00
RandySheriffH
5e3a266709
Rashuai/top k0 (#909)
* allow opset 10 topk to accept K==0

* add test case

* return empty tensor

* fix comment
2019-04-25 21:32:49 -07:00
Yufeng Li
0d2181cf85
Remove parallelfor for certain ops (#908)
Parallelfor makes maxpool, gather and reduce ops slower. This PR:

removes parallelfor for those ops
add windows thread pool back for sgemm.
2019-04-25 19:38:59 -07:00
Dmitri Smirnov
893b48e92a
Implement Mod operator (#900)
Implement Mod operator
2019-04-25 17:49:11 -07:00
Scott McKay
b8eaa88bd4
Migrate ReverseSequence from contrib op to ONNX opset 10 (#896)
* Update ONNX to 70c9026ca11b0af0050f8186bea6cab94636947f to pickup ReverseSequence op.

Copy ReverseSequence from contrib ops to ONNX (keep contrib op in this commit), and update to use int64_t for sequence_lens input.

* Copy ReverseSequence from contrib to ONNX and update to use int64_t for sequence_lens.

Maintain contrib op in this commit.

* Remove contrib op as it was temporary and only used internally.

* Remove contrib op schema defs.

* Cleanup contrib_defs.cc
2019-04-26 09:26:46 +10:00
jignparm
8ed3eed7b5
Fix ceil_mode not defined for mkldnn pool.cc warning (#907) 2019-04-25 12:32:28 -07:00
Pranav Sharma
80ac858016
Remove OSes/architectures that we don't build on and have no CI for. (#904)
* support non-tensor types

* support non-tensor types.

* support non-tensor types.

* fix compilation issues

* fix compilation issues

* Build without mkldnn for release packages. We'll default to MLAS.

* Remove OSes/architectures that we don't build on and have no CI for.
2019-04-25 11:48:48 -07:00
jignparm
125a77bec4
MaxPool+AvgPool - opset 10 [Dilation and ceil_mode] (#873)
* initial checkin for dilations and ceil support

* add unit tests for ceil_mode

* Update to use versioned_kernel for AveragePool

* update mkldnn/poolc..

* Add versioning to cuda_execution_providers.cc

* minor fix

* minor fix

* minor fix

* minor fix

* minor fix

* Folding PR comments

* Folded PR comments

* removed copy of dilations from contrib ops
2019-04-24 21:59:08 -07:00
Pranav Sharma
3ff97de8da
Modify roialign to conform with the new onnx spec and take it out from contrib ops. (#901)
* support non-tensor types

* support non-tensor types.

* support non-tensor types.

* fix compilation issues

* fix compilation issues

* Build without mkldnn for release packages. We'll default to MLAS.

* Modify roialign to conform with the new onnx spec and take it out from contrib ops.
2019-04-24 20:30:44 -07:00
Yufeng Li
73bc09421c Fix deadlock in parallel executor (#891)
Fix deadlock in parallel executor
  Execute immediately if ParalellFor has only 1 task
2019-04-24 15:55:04 -07:00
nivas-x86
ba3b82648e ng ep update1 (#895) 2019-04-24 10:35:26 -07:00
Dmitri Smirnov
95ac7a2f35
Implement separators as regex (#857)
* Implement separators as regex
2019-04-24 10:23:45 -07:00
Changming Sun
1f066d4dc4 Update onnx (#893) 2019-04-24 21:31:49 +10:00
Hariharan Seshadri
9d89b23d81
BatchNorm CPU does not support non-spatial cases - explicitly handle such cases (#890)
* BatchNorm CPU does not support non-spatial cases

* skip test in c#

* Update comments
2019-04-23 21:37:21 -07:00
Yufeng Li
d0f846aad5
Tuning GRU performance for batch size >= 2 (#644)
GRU with batch size >1 is implemented on the assumption that Lotus use single-thread Eigen Gemm. The assumption doesn't hold anymore. MLAS and MKLML support multi-thread. We don't rely eigen gemm anymore.
This PR implements batch size > 1 as batch size ==1. With this change, we have about 2x performance gain for GRU.Please refer to the performance test below:
(ms)
Batch_size | Seq_length | input_size | hiddden_size | Old | New
8 | 30 | 512 | 512 | 19.16 | 10.47
16 | 30 | 512 | 512 | 28.13 | 15.15
32 | 30 | 512 | 512 | 36.97 | 26.89
8 | 30 | 1024 | 1024 | 142.853 | 55.67
16 | 30 | 1024 | 1024 | 184.397 | 72.32
32 | 30 | 1024 | 1024 236.364 | 112.78
2019-04-23 14:50:11 -07:00
Changming Sun
80d69515ed
C API: catch exceptions in OrtCreateStatus (#821) 2019-04-23 14:41:44 -07:00
Changming Sun
11806529d0
Update test data (#864)
Add:

1. mxnet_arcface
2. tf_mobilenet_v1_1.0_224
3. tf_mobilenet_v2_1.0_224
4. tf_mobilenet_v2_1.4_224
5. tf_inception_v2
2019-04-23 13:24:24 -07:00
Hariharan Seshadri
4b4b585f58
Fix minor bugs in RemoveDuplicateGraphTransformer (#883) 2019-04-23 11:30:20 -07:00
Ashwini Khade
fb3b63438d
Add python api for graph optimization level (#882) 2019-04-23 11:11:35 -07:00
ybrnathan
b0a37477db Fix memory corruption issue when CPU->CUDA memcpy is involved (#879) 2019-04-22 20:21:14 -07:00
Dmitri Smirnov
7d7627b1ac
Implement IsInf (#871)
* Implement IsInf.
2019-04-22 17:45:54 -07:00
Yufeng Li
0bf12e9dbf
Add option to enable/disable memory pattern back (#872)
Memory pattern doesn't work for parallel executor by design. Enabling Memory Pattern for parallel executor logs warning and make the perf bad.
Add option to enable/disable memory pattern back.
2019-04-22 13:49:41 -07:00