Commit graph

451 commits

Author SHA1 Message Date
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
Hector Li
e7c1b774e8
Move build dependencies like setuptools wheel numpy into docker image (#468)
* Move build dependencies like setuptools wheel numpy into docker image, so won't install them again and again for docker build

* revert the changes in install_deps.sh
2019-02-11 21:29:36 -08:00
Hariharan Seshadri
892c0653cc
TopK Op: Include support for valid axis attribute in implementation (#461) 2019-02-11 16:05:47 -08:00
Hariharan Seshadri
fdd71574d6
misc: Fix comment in op_node_proto_helper (#460)
* Fix comment in op_node_proto_helper

* PR feedback
2019-02-11 14:38:43 -08:00
shahasad
88949485ff
removed MklDnn dependency from C# (#455) 2019-02-11 14:23:09 -08:00
Jesse Benson
e57b5116d6 BrainSlice parameter represents the IP. Update parameter name to match 2019-02-11 13:01:26 -08:00
Dmitri Smirnov
aac711ab2f
Implement Sign operator. (#456)
Implement Sign operator.
2019-02-11 10:25:54 -08:00
Yufeng Li
360fc32db4
compute forward and backward parallel for MLAS and not use_openmp (#457) 2019-02-08 17:20:45 -08:00
jignparm
5d00b8b375
Fix docker gpu test for csharp package cuda 9.1 and 10 (#432)
* Fix docker gpu test for csharp package cuda 9.1 and 10

* correct docker file name
2019-02-08 14:02:38 -08:00
Yufeng Li
7b37dc6105
Enable USE_MKLML_FOR_BLAS (#387)
* Enable USE_MKLML_FOR_BLAS

* add mklml include directory for onnxruntime_provider and onnxruntime_provider_cuda

* add mklml_include_dir to include_directories
2019-02-08 07:14:37 -08:00
Pranav Sharma
db0fde9add
Make USE_MLAS macro conditional on cmake flag for consistency with other options and make it ON by default. It was already enabled by default today. (#454) 2019-02-07 18:33:00 -08:00
Changming Sun
4cdb0cbf6e A tiny fix in KernelCreateInfo 2019-02-06 17:59:20 -08:00
edgchen1
fb04940ad3
Initial implementation of NonZero op. (#437)
Initial implementation of NonZero op.
2019-02-06 17:46:31 -08:00
Changming Sun
7c70d9349a Fix a bug in execution_provider.cc 2019-02-06 17:08:38 -08:00
Dmitri Smirnov
657d46fb3c
Output empty shape scalar for empty input. (#451) 2019-02-06 17:04:19 -08:00
Changming Sun
f20258e9ed Delete dead code 2019-02-06 15:34:41 -08:00
shahasad
8a8d1b0cea
Fix MacOS shared library build (#447)
* try removing the --version-script

* remove --no-undefined flag

* remove the -rpath linker flag

* remove the -rpath linker flag, including the -Wl

* remove the --whole-archive flags

* added -all_load -noall_load flags in place of --whole-archive and --no-whole-archive

* spell correct all-load

* set the MacOS specific cmake configs with if(APPLE) condition

* added --build_shared_lib to mac CI
2019-02-06 15:27:37 -08:00
Hector Li
f14b258a5c
Fix float 16 type support for some CUDA kernels (#436)
* Correct the Consts::Zero & Consts::One for half type

* 1. Fix the CreateConstantOnes for float16 type
2. Add cuda kernel code in the BatchNorm for float 16 type, there's issue to run cudnnBatchNormalizationForwardInference with float 16 type
3. Add float 16 test case for Gemm & BatchNorm CUDA kernel only

* Fix build

* fix Linux build

* fix build

* Update the fix for BatchNorm, still use cuddn API cudnnBatchNormalizationForwardInference. The root case is, for half type, should use alpha, beta, scale, B, mean, var with float type.

* fix build

* enable 2 fp16 models for GPU test

* enable fp16 test for MaxPool

* Need to adjust per_sample_tolerance configuration in the model test
2019-02-06 14:17:36 -08:00
Changming Sun
5866e853c4 Add dev notes 2019-02-06 14:10:48 -08:00
Raymond Yang
7cd393d697
Fix 3.7 build; Add cuda version in README (#427) 2019-02-06 13:38:04 -08:00
Weixing Zhang
b29c6e48b4
The files of graph_transformer.h and rewrite_rule.h has been moved. (#446) 2019-02-06 13:30:39 -08:00