Commit graph

274 commits

Author SHA1 Message Date
Raymond Yang
ec2cf59baa
Enable building python37 packages (#283) 2019-01-05 18:41:40 -08:00
Pranav Sharma
de383d93be
Fix inconsistency in enum names in the C API (#277)
* Fix inconsistency in enum names in the C API

* fix build
2019-01-04 16:41:15 -08:00
Ke Zhang
251d4bbb23
adjust the quantization ops' definitions (#278) 2019-01-04 16:05:29 -08:00
shahasad
8a7b6761de
changed nativeLib name from onnxruntime.dll to onnxruntime, for cross platform (#275) 2019-01-03 19:52:21 -08:00
Ke Zhang
75934af896
have Im2ColNd support all types and allow customized padding value. (#273)
* have Im2ColNd support all types and allow customized padding value.

* only specialize the template in order NCHW.

* fix build break.

* fix build break
2019-01-03 19:24:06 -08:00
Dmitri Smirnov
058803086d
Implement N-gram (#180)
* Implement N-gram
  Do not load unnecessary pool n-grams. Add String typed tests.
  Set output size to the mav ngram_index value plus 1.

* Address security warnings and some review comments.

* Fix build issues, rework sampling to try all n-gram sizes at a given offset.

* Rework the loop so all n should be tried at a given offset
  and we do not add the same items all over again such as
  b,c and next we try b,c,d but we no longer add b,c again.

* Compute hash incrementally so we do not re-hash elements that were
  already there when we add more elements to n-gram.

* Address review comments.
  TODO: Remove all attribute.

* Remove all attribute, adjust tests. Correct docs.

* Address more review comments.

* Create Type And Shape inference function.

* Address review comments. Implement batch mode per new spec.

* Correct switch bracing in OutputResult and re-test.

* Fix shape error message within TypeAndShapeInferenceFunction.
2019-01-03 16:21:03 -08:00
ashku-ms
8fba324678
Hyperbolic inv ops (#272)
Implement Inverse for hyberbolic ops

Eigen will add support for asinh, acosh and atanh in the upcoming release. But until then for completeness of opset9 we have std based implementation.
2019-01-03 15:04:55 -08:00
Tang, Cheng
d0fa974976
interface change to code-generated kernels (#192)
* merge function compile interface

* fix build error

* fix linux build break

* fix static cast issue; fix clang style

* fix argument change

* use alignment allocation;fix comments in pr

* fix linux break

* apply clang format

* rename according to comments in pr

* rename according to pr comments;remove useless file

* remove the need_compile flag

* avoid passing whole session state
2019-01-02 17:18:08 -08:00
xkszltl
5b6f1823af Use CUDA libraries found by CMake. (#190)
* Link cudart and use CMake predefined variables for cublas.

* Patch for old cmake.

* Remove static cudnn.
Fix file name for cuBLAS DLL delay loading.
2019-01-02 16:51:42 -08:00
Randy
fc76076e29
Rashuai/dynamic slice refactored (#264)
* define dynamic slice

* remove obsolete

* add test cases

* remove disabled cases

* rename test cases

* fix comments

* format code

* fix comments

* fix compile err

* fix typo

* removed duplicated delaration

* add enforced checks

* add enforced checks

* add extra processing on negative axis

* fix typo
2019-01-02 16:39:41 -08:00
Yuan Yu
bd2ace7619 Tweak linker flags to minimize the binary size. (#270) 2019-01-02 14:50:34 -08:00
Pranav Sharma
e7e90c0322
Implement OneHot op. (#213)
* Implementation of OneHot op

* Implementation of OneHot op

* Implementation of OneHot op.

* one hot op

* onehot

* OneHot op.

* Disable some Eigen related warnings

* fix build

* Add comment for potential optimization opportunity using Eigen threads

* Remove this op from the broken tests
2019-01-02 14:49:56 -08:00
xkszltl
bddeb3d001 Fix "invalid escape" issue when eigen_SOURCE_PATH contains "\". (#258) 2019-01-02 14:00:21 -08:00
Ke Zhang
eb67eadbc6
add initializer for sub-graph. (#269) 2019-01-02 13:10:33 -08:00
Raymond Yang
8f3a492682 Remove static linked cuda libs (#239) 2019-01-02 10:39:37 -08:00
Yufeng Li
e2746513ab
Avoid to run profiling code completely if there is no need (#245)
* add option to build essentials feature for optimization

* Check if profiler enabled before calling it

* Refine the profiler
2019-01-01 09:34:24 -08:00
Du Li
1e9be01a49
Fix a bug in Conv+Activation fusion (#236)
* fix a bug

* fix a bug

* remove node in reverse topologic order.

* replace vector with deque

* fix bugs in conv+activation fusion

* Integrating PR comments.
2018-12-31 16:56:11 -08:00
Du Li
4f49a4ab1b
Maxpool_With_Mask (#267)
* Adding Op ConvMaxpool

* Adding MaxpoolWithMask Op.

* Skip length check for the first element

* Fix build errors.

* Fix build errors.
2018-12-29 20:15:02 -08:00
KeDengMS
b508835e7a
Update CUDA Gemm to opset 9 (#266) 2018-12-29 19:57:45 -08:00
Tang, Cheng
126c1fd3df do replacement based on node arg usage, instead of provider type (#263) 2018-12-29 12:10:08 -08:00
Ryan Hill
6a090985fb More C API changes (#259)
* More API changes, remove 'Inference' from function names. Remove enum values. Make Status match other types.

* Switch to bool instead of int, and remove stdbool
2018-12-28 14:53:19 -08:00
shahasad
29d03ffb08
Add end-to-end test to run on the nuget package (#252)
* added end-to-end nuget package test

* reset the changes in OnnxRuntime.CSharp.proj

* revert the testdata directory path

* revert inference tests proj file

* added script for running end-to-end tests

* fix in the runtest.bat

* added error checking in runtest

* fixed paths in the test project

* added runtest.sh

* fix protoc path

* updated executable attributes for the runtest scripts

* added some log to debug protoc failures

* removed the protoc and duplicate test code, reuse unit-test code for end-to-end test

* copy always

* fix working dir paths in runtest.sh

* added a build.py flag to download test data without running the c++ tests

* added a script for running the test under docker

* added script for docker run of the test
2018-12-27 15:22:46 -08:00
Du Li
8380e56409
Optimizing Gather op. (#262) 2018-12-27 11:31:43 -08:00
Darío Hereñú
928acc32f1 Minor formatting proposals 2018-12-26 13:46:32 -08:00
Changming Sun
698ebf13a1
Add a missing header (#243) 2018-12-21 19:06:09 -08:00
Changming Sun
79c623bece Add more test models 2018-12-21 19:03:43 -08:00
Changming Sun
f3df7e5d32 nullptr 2018-12-21 18:31:22 -08:00
Sreekanth Yalachigere
b93eba17c7 mkldnn: relu, sum and batch norm (#238)
* mkldnn sum derives cpu sum_6. removed final

* MKLDNN Relu, Sum and BatchNorm

* PR review changes

* more review changes

* relu primitive typo corrected
2018-12-21 15:25:10 -08:00
Pranav Sharma
3875511f9e
Fix inefficiencies in the mkldnn kernels. Some of these were (unfortunately) getting replicated in the new kernels. (#241) 2018-12-21 15:12:23 -08:00
Dmitri Smirnov
7af1887b33
Introduce basic BFloat16 runtime support (#235)
* Add basic support for BFloat16 type.

* Advance onnx submodule for bfloat16 support.

* Update install_deps for linux.

* Address review comments.
2018-12-21 12:40:59 -08:00
Yufeng Li
4e74ffba91
Add word conv embedding custom op (#229)
* run bw and fw sequentially for GRU if using MKLDNN

* word conv embedding custom op

* run bw and fw sequentially for GRU if using MKLDNN

* Add word conv embedding custom op

* fix build break in linux

* fix macos build break

* resolve the comments

* refine the comments

* remove unnessary comment

* rename the function to calculate the length of eache word in a sequence

* add license info and fix typo
2018-12-21 10:48:51 -08:00
Ryan Hill
a37887cfa1
More intuitive ordering to the API functions (#233)
* More intuitive ordering to the API functions

* Rename TCHAR_T
2018-12-20 13:47:48 -08:00
Tang, Cheng
c453b48b71
update kernel memory type interface (#225)
* refactor the kernel memory type interface

* remove useless change

* fix comments in PR
2018-12-20 11:11:50 -08:00
jignparm
a43382e390
Jignparm/csharp gpu (#221)
* Minor updates to exception message

* update models folder to new location

* update copy to preservenewest

* reenable pretrained test

* added some debugging info for build

* update pretrained test, and tensor proto definition
2018-12-20 09:58:03 -08:00
ashku-ms
a19b624302
MaxUnpool Operator - CPU Implementation (#177)
* Initial commit Maxunpool operator

* fix gpu build failure

* remove op test from excluded list

* Change to ORT
2018-12-20 09:44:34 -08:00
jywu-msft
eb867be331
update mkldnn to 0.17.2 (#231) 2018-12-20 07:32:49 -08:00
KeDengMS
abce6041c1
Print hex value for float compare when test failed (#228)
This helps identify fp accuracy issues
2018-12-19 21:31:15 -08:00
Tang, Cheng
0dca080238 remove useless internal schema file (#226)
* placeholder for internal contrib ops

* remove useless internal file

* fix build break
2018-12-19 18:17:20 -08:00
Weixian
1d95c93987 [optimization] avoid vector copy and reduce allocation. (#203)
* few.

* fix.
2018-12-19 18:16:39 -08:00
Dmitri Smirnov
255ee39af6
Fix memory leak by improper handling of std::string typed (#227)
output buffer. Tensor returns a buffer to fully constructed
  std::strings and we should treat them as such.
2018-12-19 17:46:21 -08:00
Changming Sun
e97caa7787 change mkldnn so path (#210) 2018-12-19 14:45:57 -08:00
ashku-ms
84231ba003
support hyperbolic ops (#223)
* support hyperbolic fns

This commit adds support for sinh and cosh. Support for hyperbolic inverses is not available in Eigen yet.

* Make constructors explicit

* remove tests from exclude list

* Revert "remove tests from exclude list"

This reverts commit 2112a30b57d5a899991de4847e948e700a44e85d.

* remove test names from excluded list

* remove tanh since its already implemented
2018-12-19 14:23:09 -08:00
Edward Chen
e63572c1f3 Updated ArrayFeatureExtractor op to retain old output shape behavior. 2018-12-19 14:12:55 -08:00
Tang, Cheng
94f8f2b05c placeholder for internal contrib ops (#219) 2018-12-19 13:54:12 -08:00
KeDengMS
b9cc134576
Make sure tensor sizes are 64-byte aligned (#222)
This helps reduce misaligned access violation
2018-12-19 13:45:04 -08:00
Bowen Bao
4d010fb1ea Add null check before calling node.op_->Deprecated(). (#211) 2018-12-19 11:43:36 -08:00
Changming Sun
ac3a081ec5 Enable release build in Windows CI pipelines (#220) 2018-12-19 11:12:43 -08:00
Jesse Benson
0248390e4d Add support for checking for F16C support (https://en.wikipedia.org/wiki/F16C). (#212) 2018-12-19 09:25:25 -08:00
Scott McKay
ab350fa4c7
Re-structure the inference session initialization to (#217)
- apply any transforms to the main graph and any subgraphs first
  - call Graph::Resolve() once on the main graph, which will recurse into the subgraphs
    - previously it was called after the transform on each subgraph, which results in it traversing up to the main graph to call resolve, and that resolve call recursing into all subgraphs every time.

This avoids lots of unnecessary Graph::Resolve calls, and prevents subgraphs from being broken by SessionStateInitializer::InitializeAndSave calling graph_.CleanAllInitializedTensors() prior to final Graph::Resolve call. If a subgraph has optional inputs the backing initializers were removed by CleanAllInitializedTensors causing the next Resolve to incorrectly turn them into required inputs.
2018-12-19 18:56:35 +10:00
Scott McKay
334e329642
Increment/decrement UseCount for outputs so that we don't prematurely free a re-used output that is used for a dead output (output with zero users). (#214) 2018-12-19 15:34:37 +10:00