Commit graph

471 commits

Author SHA1 Message Date
jignparm
94bd74190a
Revert to cuda 9.1 for package release (#546) 2019-03-05 17:20:51 -08:00
Ke Zhang
47a9abd212
minor change for validating input types (#532)
* minor changes for ValidateInput in inferencesession level api.

* update

* valid real graph input and don't validate initializers

* refine the validation logic.

* remove the unnecessary validatation test.

* ensure that the exact input feeds provided from caller.

* fix tests.

* fix c# test failure.

* fix test case

* don't verify the error message which is hard to maintain.

* fix c# test case

* c# test

* c# test

* fix test cases.

* test update
2019-03-05 16:29:39 -08:00
Changming Sun
bfa21c0b9f Re-enable the tests disabled during C API renaming 2019-03-05 16:06:38 -08:00
jignparm
1288a8caed
Initial check-in to support non-tensor (sequence/map) types (#527)
* Initial check-in to support non-tensor (sequence/map) types

* Added support for String tensors

* address PR comments
2019-03-05 16:00:40 -08:00
Hariharan Seshadri
1d3fcc525a
deps: update onnx to a newer commit and update test exclusions (#542)
* Update onnx dep to a newer commit and update test exclusions

* Keeping shrink excuded in c++ tests

* More changes
2019-03-05 12:03:16 -08:00
Du Li
30be4c1ef8
Fix a bug in test data (#539)
* Fix a bug in test data
2019-03-05 11:23:21 -08:00
Raymond Yang
f5dfbba655
Clarify numpy version requirement (#537)
* update packaging numpy version to 1.15.0

* update version in numpy version in linux

* Install numpy 1.15.0

* Finish up numpy requirement after test

* Try fix

* Fix ci script
2019-03-05 11:07:28 -08:00
Yulong Wang
7aba5fe523
perf_test_runner: support specifying thread number (#538) 2019-03-04 16:17:01 -08:00
Randy
4c684a133a
bump up version to 0.3.0 (#536)
* bump up version to 0.3.0

* change to op9 and cuda9.1
2019-03-04 13:41:53 -08:00
Weixing Zhang
8a59287c46
Create OptimizerExecutionFrame for graph optimization (#526)
* Create OptimizerExecutionFrame for optimizer

With this change, optimizer can easily invoke CPU kernels for graph optimization.
2019-03-04 10:56:41 -08:00
Randy
290c472839 remove mkldnn from linux packages (#533) 2019-03-03 20:52:27 -08:00
Hariharan Seshadri
a697e0b710
Implement Shrink operator (#485)
* Initial commit

* Adding shrink tests

* Fix formatting in shrink_test.cc

* Fix broken build

* More changes

* PR feedback and formatting

* Place files in the right location corresponding to def file location in onnx

* Exclude shrink model test in test_series.py

* Remove shrink from exclusion list in main.cc

* Adding test to exclusion list

* More tests

* Formatting

* PR feedback

* PR feedback

* More changes

* PR feedback

* More changes

* Fix broken build

* Fix nit

* Fix nit
2019-03-01 12:51:22 -08:00
Raymond Yang
9fb80ea927 Fix cast optimizer (#524) 2019-02-28 13:35:52 -08:00
Scott McKay
2e6ec07d9a
Check some return status values that were ignored and add logging of any error messages in onnxruntime_perf_test. (#525) 2019-02-27 20:20:06 -08:00
Scott McKay
6c7099a18e
Break dependency on SessionState for ExecutionFrame and OpKernelContext so optimizers can execute a node with a minimal setup (#498)
* Break dependency on SessionState for ExecutionFrame and OpKernelContext so optimizers can execute a node with a minimal setup.

- Create IExecutionFrame
  - split out core logic and interface from extended logic used in full Graph execution (that uses allocation plan and memory pattern planner)
- Update NodeIndexInfo to allow contruction from a subset of nodes
  - split out logic from GraphNodes into a re-usable template so it can be used with a vector of const Node* as well as a vector of unique_ptr<Node>
- Remove SessionState from OpKernelContext
- Misc cleanups
  - move AllocPlanPerValue out of SequentialExecutionPlan as it's used in a more generic manner that isn't specific to a sequential execution plan

NOTE: I manually tested the new paths, especially NodeIndexInfo. There will shortly be optimizers added that use the new infrastucture so they'll get test coverage as part of those changes.

* Fix linux build issue.
Handle graph with no nodes in NodeIndexInfo.
2019-02-27 15:46:50 -08:00
Scott McKay
dfa21af302
Update C API to allow user to enable caching of feeds and fetches info across calls to Run (#522)
* Add ability to enable caching to the C API, and update the internals to pass the feed names and MLValue instances in vectors so the order is deterministic (so cache entry matching works as expected).

* Address PR comment and don't use 'bool'

* Remove meaningless C# test around duplicate input.

We _could_ check input names for duplicates (previously we did this via the usage of unordered_map), but the system will gracefully handle with the duplicate anyway (will just use the last value provided for the input name).

Based on that, I don't think the cost of checking for duplicates is worth it.

* Fix c-style cast in test_run_options.
2019-02-27 13:41:17 -08:00
Faith Xu
96d5211869
Update cgmanifest (#502)
* Update cgmanifest 

...to include all custom registered CG components

* Update cgmanifest.json

* Updates based on feedback

* Remove .NET (auto-detected)
2019-02-27 12:01:24 -08:00
Yang Chen
6e79c93dd2
replaced onnx namespace with ONNX_NAMESPACE (#519) 2019-02-25 22:25:41 -08:00
jignparm
bdf72ad5e3
Update C-API with working example (#503)
* Add working example of C-API

* Section formatting

* Shortened example, and grouped by functionality

* Update C_API.md
2019-02-25 19:06:51 -08:00
Pranav Sharma
0b841c3bd4
Fix various issues with murmurhash. (#514)
* Fix murmurhash when multiple strings are in the input. Also add an attribute to specify output type like sckitlearn. Add type inference to decide output type based on this attribute.

* Address PR comment
2019-02-25 09:58:18 -08:00
shahasad
f9bae489bd
cleanup extra header from c api and sanitize C api test (#517)
* cleaned up the additional header in C-api

* ensure test failure surfaces in the build pipeline

* sanitized runtest.bat

* cleanup unneeded headers

* formatting and typos
2019-02-24 21:06:54 -08:00
jignparm
668fcf22d8
Update InferenceTestCapi.cpp (#516)
* Update InferenceTestCapi.cpp

* switch cwd to folder containing model

* Update

* minor logging
2019-02-24 17:30:33 -08:00
Pranav Sharma
2f1e883c71
Don't use mkldnn and tvm for release pkgs. (#511)
* 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 tvm as well

* Add openmp
2019-02-22 19:29:06 -08:00
Changming Sun
4c7fd49949
Add a few benchmarks (#512)
* Add a few benchmarks
2019-02-22 13:19:54 -08:00
Scott McKay
5171e8b129
Make IExecutionProvider::Type return const std::string& instead of a new string. (#506)
Store the type string in IExecutionProvider so that Type() doesn't need to be a virtual.
2019-02-22 18:27:01 +10:00
Scott McKay
d6a70470dd
Update build.md to say CUDA 10 should work with any VS2017 version. (#507) 2019-02-22 11:05:08 +10:00
jignparm
9d14cbdb1a
Throw friendly error message when Linux distribution has libc version < 2.23 (#493)
* Add check for linux version supporting glibc 2.23 or higher

* Refactor the libc check to SessionOptions

* removed whitespace

* Update SessionOptions.cs
2019-02-21 11:34:44 -08:00
shahasad
62bbe8de40
fix downcast errors in 32-bit build (#501) 2019-02-21 10:05:08 -08:00
Hariharan Seshadri
c2b8ac0154
MatMul op: Support new integer types and double type as part of opset V9 compliance (#482)
* Support new integer types and double type as part of opset V9 compliance
2019-02-20 17:03:37 -08:00
Changming Sun
b69c834c06 Optimize graph partition 2019-02-20 16:32:04 -08:00
Dmitri Smirnov
0e687a2c90
Implement tokenex regular expression matching and add tests. (#480)
* Implement tokenex regular expression matching and add tests.
  Import re2 module.
2019-02-20 15:56:32 -08:00
Changming Sun
b02c1d80d4 Fix an SAL annotation in the C API 2019-02-20 12:51:00 -08:00
Scott McKay
fc7185f060
Various optimizations to reduce the setup and device copying cost outside of the call to ExecuteGraph. (#470)
* Various optimizations to reduce the setup and execution cost.

Cache information about the feeds and fetches, and any device copies required to execute the graph so we minimize checking for later calls to ExecuteGraph using the same input/output.
  - enable use of caching in Loop and Scan
  - make use of caching optional for InferenceSession::Run
    - handle calls to Run with different feeds and fetches to support scenarios where there may be a truncated sequence in some calls

Take the feed names and MLValue instances as vectors so the order is deterministic.

Add unit tests

Update onnxruntime_perf_test to enable caching.

* Couple of tweaks.
Fix shared library unit test failure.
Attempt to workaround MacOS build failure due to VC++ bug around including reaching scope values in a lambda automatically.

* Rework order of init in Run so we get nice error messages about invalid feed/output names.

* Refine logic around copying MLValue using execution provider so common code can be used. Simplify the logic due to this change.
Split the paths for executing with/without cached info so we can be more const correct with how FeedsFetchesManager is passed in. This makes it clearer when a shared instance can be used due to it being const.
Cache the FeedsFetchesManager instances in the control flow nodes. They can be re-used across calls to Compute.

* Removed unused local variable to fix some builds.

* Fix build issue by cleaning up some more unused params.

* Check names when using cache entry from SessionState. Add unit test.
2019-02-20 12:12:17 +10:00
Hector Li
4408342f0b Fix a issue for cuda reduce Max Min (#474)
* Fix a issue for Reduce Max, Min. Per cudnn document, only Max/Min ops requires the indices output, it will report error if requesting indices for the other reduction ops.
2019-02-19 17:12:04 -08:00
Pranav Sharma
9bc6503463
Support non-tensor types in the C API. (#489)
* support non-tensor types

* support non-tensor types.

* support non-tensor types.

* fix compilation issues

* fix compilation issues

* fix compilation issues

* add test cases

* test cases

* add test cases

* try to fix string test case

* working now

* use allocator (broken)

* string test broken after using allocator

* full working example

* Fix PR comments
2019-02-19 14:11:46 -08:00
Dmitri Smirnov
da1cf8fff0
Remove exclusions for Sign operator model tests. (#490) 2019-02-19 11:52:26 -08:00
Faith Xu
54acfc0432 TPN update and link fix (#483)
* TPN update

* Update TPN

* Update link
2019-02-17 22:29:10 -08:00
shahasad
ee702bd288
patched the logic of removing the ._*.onnx file, in case it comes in position other than the first in listdir (#484) 2019-02-15 16:08:20 -08:00
jignparm
1f1dcc352f
Add Native C API test from NuGet (#481)
* Initial check-in of Native Capi tests

* Minor update

* Updated with OrtCreateCpuAllocatorInfo working after including cpu_provider_factory.h

* Minor editw

* Minor update
2019-02-15 13:42:24 -08:00
Randy
2a9a924c23
Add float16 support for fusion (#476)
* Add float16 support for fusion

* update test case

* update test case
2019-02-14 10:01:25 -08:00
liqunfu
9add0e9a9f random generator to continue generate random numbers (#477)
* random generator to continue generate random numbers

* update with reviewer's comments

* update with reviewer's comments, remove an unnecessary change

* random generator to continue generate random numbers, update with reviewer's comments
2019-02-14 13:59:34 +10:00
jignparm
f6ffa1280a
Updated endtoendtests to not copy model files (#479) 2019-02-13 17:43:43 -08:00
Hariharan Seshadri
62532ec1b0
Minor cleanup in TopK operator (#478) 2019-02-13 12:51:05 -08:00
ybrnathan
f2510127a2
Optimize pad performance (#472)
* Optimize pad performance by flatten the inner most no padding axis. This will significantly reduces the total number of memcpy since memcpy usually only happen for inner most axis.

For example, for a shape of [1,224,224,3] with padding [0,3,3,0,0,3,3,0], can be flatten as [1,224,672] with padding [0,3,9,0,3,9].

With this fix, Pad performance can be improved by >7 times for above example.

* Fix typo in comments of pad performance optimization

* Pass dims as const reference instead of value.

* Fix Linux GPU warning

* Move dim check to Init.
2019-02-12 21:48:54 -08:00
edgchen1
0a23d23266
Initial implementation of Where op. (#412)
* Implemented Where op.

* Enabled Where op for string T, changed to broadcaster to pass const reference scalars.

* Addressed PR comments.

* Removed where_example from broken tests.

* Removed some Python ONNX backend tests from exclusion pattern.

* Addressed PR comment.

* Fixed Linux build error.

* Added non-Eigen path for non-arithmetic types.

* Use std::is_arithmetic instead of std::is_arithmetic_v.

* Added type_traits include, renamed function.

* Fixed gcc build error.
2019-02-12 16:06:17 -08:00
Changming Sun
d05b74b1b7 Delete Tensor::ShallowCopy 2019-02-12 15:51:36 -08:00
Ke Zhang
fc90a9b2fc
allocator refactor (#467)
* update CPUAllocator.

* onnxruntime

* fix build break

* remove useless subclasses of CPUAllocator.

* refactor to get allocator from executionproviders instead of execution provider.
2019-02-12 14:14:21 -08:00
jignparm
0c4fef9ac2
Jignparm/removemodelcopies (#471)
* Adding initial props file updates to support native projects

* remove unnecessary header files

* removed double backslashes

* only include c api header, drop cxx api

* Remove copying of test models
2019-02-12 13:04:51 -08:00
Raymond Yang
ec8ac04f30
Update cast op to support string <-> numeric (#379)
* Update cast kernel to support to/from string

* Update namespace

* Add support for literal numeric case

* Update to support -INF test

* Update kernel registration for cast

* Update ONNX to 1.4.1

* Update registy api

* Resolve some comments

* Update cast kernel implementation

* Resolve comments

* Fixed test data in onnx

* Update cast kernel implementation

* Resolve PR comments

* Update cast_op.cc

* Update onnx commits info

* Update comments
2019-02-12 10:10:56 -08:00
shahasad
f72474c24b
Updated System requirements in README.md (#466)
* Updated System requirements in README.md

* spell correct
2019-02-12 09:58:20 -08:00