Commit graph

736 commits

Author SHA1 Message Date
Yufeng Li
d6a30485be
Rename Tensor.Size() to Tensor.SizeInBytes() (#1502)
Rename Tensor.Size() to Tensor.SizeInBytes()
2019-07-26 14:15:53 -07:00
Changming Sun
be02214a17
Add a comment to onnxruntime_cxx_inline.h (#1466) 2019-07-23 08:45:37 -07:00
Pranav Sharma
818c023535
Add/correct missing SAL annotations + avoid using unsigned types (except where counts are involved). (#1451)
* Add/correct missing SAL annotations + other cosmetic changes.

* Add Outptr

* Don't use unsigned types
2019-07-22 23:25:53 -07:00
shahasad
768ced703c
Expose provider factory C API, especially for CUDA users (#1461)
Exposed provider factory C API, for cpu and cuda providers, into the published packages.
2019-07-22 19:03:06 -07:00
Changming Sun
df3a157dd1
Add noexcept to cxx api (#1448) 2019-07-20 08:33:04 -07:00
Ryan Hill
9e2fa69785
Ryanunderhill/c api string arg (#1436)
* Add string attribute interface for C API.

* Add string attribute interface for C++ API accordingly.

* Update comment to say that string is also valid
2019-07-19 19:53:37 -07:00
Scott McKay
07a2466d9f
Use INFO instead of WARNING for an unused graph input. (#1235)
* Use INFO instead of WARNING for an unused graph input.

* Drop severity of unused initializer as well

* Update to output a warning level message if removing an initializer that is never used, and an info level message if removing an initializer that optimization has made redundant.
2019-07-15 20:29:30 +10:00
Scott McKay
61b733ce6d
Update optimizers to be able to utilize a constant initializer from an ancestor graph (#1346)
* Now that we check for a constant initializer in an ancestor graph we also need to be able to retrieve and replace that initializer.
Add helpers to do so.
Update optimizers to use the new helpers.
Fix bug in UnsqueezeElimination where it wasn't checking if the initializer it was replacing was constant.
2019-07-15 12:41:01 +10:00
Ke Zhang
3bf0e364e2
Move CopyTensor out of IExecutionProvider interface. (#1268)
* add ortdevice class

* add data transfer manager for copying tensors.

* update

* add data trasnfer for gpu

* fix constexpr build break.

* update

* remove unnecessary header files.

* remove unnecessary header files.

* add dependency

* add dependency

* add dependency

* add dependency

* fix linux build break.

* update

* fix build break

* fix build break

* fix build break

* update

* update

* update c api.

* update to not use OrtCreateAllocatorInfo

* change to all eps .

* fix linux build break

* remove useless codes.

* update

* move datatransfermanager in session state

* update

* fix cuda build break.

* fix comments

* fix windows GPU build.

* fix comments

* fix build break

* fix comments

* fix test failure

* update

* fix comments

* fix onnx runtime server.

* update

* fix test failure.

* fix comments

* fix comment
2019-07-11 14:49:20 -07:00
Tracy Sharpe
823fa3f39c
Integrate MLAS NCHWc support into ONNX Runtime (#1327)
This change integrates the NCHWc support recently added to MLAS into ONNX Runtime. When using "-o 3" optimizations, then the runtime will do a NCHWc layout optimization pass to convert standard ONNX operators such as Conv/MaxPool to the com.microsoft.nchwc domain with weights and biases reordered for speed.
2019-07-09 20:41:19 -07:00
Changming Sun
27da857b51 Fix an SAL annotation in onnxruntime_c_api.h 2019-07-09 10:14:58 -07:00
Pranav Sharma
e9ce51ead4
Make GetTensorShapeFromTensorShapeProto return TensorShape and not it's internal representation. (#1353) 2019-07-08 11:45:55 -07:00
Scott McKay
9d3b6b3a49
Disallow overriding initializers if IR version < 4 (#1324)
Description:

Disallow overriding an initializer via a graph input if the IR version is < 4. This enforces an implicit assumption that initializers should be treated as constant, and allows constant folding to be done on a model with an older IR version.
Separate constant and overridable initializers so that it's clear which ones constant folding can utilize.
Update Graph to not add all initializers to the graph inputs when the graph is manually created (i.e. not loaded from a GraphProto) and the IR version is >= 4.
Motivation and Context
In order to do constant folding we need to know which initializers can be treated as constant and which are overridable. All initializers were required to have a matching graph input prior to IR version 4, technically making all of them overridable. The intention however was for them to be treated as constants, and this change enforces that intent.

The benefit of doing so is that constant folding will work for models with IR version < 4. The cost is that if someone is actually overriding an initializer they will need to update the IR version of their model to version 4 in order to keep doing so. The belief is that this is a very small subset of usage (e.g. models involving feeding in a truncated sequence) and the cost to update that small subset is warranted by the benefit of constant folding being able to be enabled on all older models without them needing an IR version update.
2019-07-03 18:43:38 +10:00
daquexian
c65489a47f Initial PR for NNAPI execution provider (#1220)
* init

* Update DNNLibrary

* Update DNNLibrary, set compiler flags, it compiles now

* Add more missing flags, add test

* Update DNNLibrary

* Update Compile method, fix allocator and some other bugs

* Update DNNLibrary

* Implement CopyTensor

* Not delete state explicitly since it is managed by unique_ptr

* Add the missing files when SingleUnitTestProjct is ON

* misc changes

* Fix wrong name in provider factory

* Add my own test

* Update the code of add node into graph, and add the missing initializer into graph

* Fix the bug that re-build the graph produces extra output

* Update DNNLibrary

* Transpose nchw (ONNX) -> nhwc (NNAPI)

* Add license

* Add GetSupportedNodes method (implement it later)

* Rename onnxruntime_nnapi_test->onnxruntime_nnapi_squeezenet_test

* Update squeezenet_test.cpp after rebase master

* Remove squeezenet_test.cpp since it is almost same with the c++ sample

* Update DNNLibrary for GetSupportedNodes

* Update GetSupportedNodes

* Revert "Remove squeezenet_test.cpp since it is almost same with the c++ sample"

This reverts commit a97575fd9ff49e50ba1dc8d8154790d8cd86c48d.

* Update DNNLibrary

* Fix multiple outputs bug

* Remove GetKernelRegistry

* Revert "Revert "Remove squeezenet_test.cpp since it is almost same with the c++ sample""

This reverts commit 2a0670e9cbf10ea654111ce39e198a4be0ddd838.

* Set default memory type of NNAPI EP

* Add CPUOutput allocator

* Update DNNLibrary for multiple outputs

* Fix bug of nhwc->nchw

* Remove GetExecutionHandle()
2019-07-02 06:03:29 -07:00
Scott McKay
4d765dc6d0
Return error message from status instead of swallowing it. (#1221)
* Return error message from status instead of swallowing it.

* Return OrtValue* from OpKernelContext::GetOrCreateOutputMLValue

* Add unstaged change.
2019-06-22 06:26:42 +10:00
Changming Sun
766c6b6163
Add an API for retrieve ORT version (#1263)
* Add an API for retrieve ORT version
2019-06-20 15:42:12 -07:00
S. Manohar Karlapalem
8d15ffd8f5 Initial commit for OpenVINO Execution Provider (#935)
* Initial commit for OpenVINO Execution Provider

OpenVINO Execution Provider provides the interface for ONNX Runtime
applications to access Intel's hardware accelerators using Intel's
OpenVINO Toolkit.

* Fixed bug in GetCapability to disable custom ops

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added OPENVINO ci pipeline

Added new pipeline for openvino provider,
made changes to support the docker build and
onnxruntime build with openvino.

Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com>

* Enabled all unit tests for OpenVINO EP

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Fixed syntax issue in run_docker_build.sh file

* Added missing default OPENVINO_VERSION

Default value for OPENVINO_VERSION env was
missing causing the build to fail

* Added install Model Optimizer deps step

* Fixed python unit tests and some tests from onnx_backend_test_series

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Fixed indentation bug

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled some of the python backend tests for OpenVINO

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled some model tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Remove Duplicate checks for openvino in build.py

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Modified GetCapability for FP16

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled GPU FP32 tests that are not supported

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Convert modelProto to string and use it in compile

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Pass byte-array input args to MO

* Serialized ModelProto passed in-memory to MO

ModelOptimizer python module receives the serialized  ModelProto
in-memory.
Uses appropriate ONNX function to load the serialized bytes.

* Make Py_Finalize compatible with older python versions

Also, remove pFunc unassigned variable possibility.

* Fallback if input dims of Matmul is greater than 2

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* fixup: Device #define syntax

* Updated the documentation

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Enable dynamic dim value

* removed commented out code

* Added Dockerfile for openvino EP

Updated instructions on dockerfiles/README.md file

Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com>

* Disabled fp16_inception_v1 test

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Code formatting with clang-format

Uses style from the .clang-format file in root directory.

* fixup: docker tag and build error fixes

* Heuristics to automatically detect batching

Distributes slices from batch into parallel infer-request objects.

* Handle disabled tests in GetCapability

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled average pool and max pool if ceil_mode is 1

Also dilations are not supported if they are greater than 1

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled Unsqueeze int32 test

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* changes to fix output results bug

* Disabled a few C++ unit tests for MYRIAD FP16

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Manually revert '9fe162bb Enable dynamic dim value'

Reverts compile time setting of dynamic shape
Reverting manually due to significantly huge auto-revert conflicts.

* Fixed unused variable warning

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled Mul test for GPU_FP16 due to accuracy issue

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* VPU documentation update

* Disabled inception_v1 for MYRIAD and HDDL

*Also disabled few C++ accuracy tests for HDDL

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* updates from upstream

* use the new CustomOpApis for I/O interfacing

* Pass initializers as subgraph meta-def inputs in GetCapability()

Requirement due to API changes introduced with PR# 1019.

* Remove obsolete functions

* Save indexes of graph inputs from fused_node info

Both inputs and initializers are passed as data inputs to the
infer function. To identify only inputs among them, save thier
index info from fused_node in Compile function.

* Documentation changes to enable VPU

* Fix VPU related changes in documentation

* Fix minor changes in documentation

* Fix VPU related changes in documentation

* Use Node.In/OutputDefs() to track graph inputs and outputs.

Don't use graph_viewer's GetInputs() or
GetInputsIncludingInitializers().

* Permit "SAME_UPPER" auto_pad attribute from MaxPool

* Disabled fp16_tiny_yolov2 in onnx model tests

* Updated documentation to include configuration guides for myriad and hddl

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Use 8 Infer requests only for VAD-R

* disable debug prints

* Clang-format source files

* Updated BUILD.md with OpenVINO R5 links

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled same upper python tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Update test exclusion syntax

* Change path of install_onnx.sh

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disable tiny_yolov2 in broken tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Revert "Change path of install_onnx.sh"

This reverts commit ba9db165f3be430f2aff1ef413299ed04637196a.
This change is only required for Intel internal CI pipeline until
the settings are matched with the upstream's CI pipeline.

* Added debug statements for debugging CI error

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Add --build_wheel to linux openvino pipeline

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added -v option to onnx_test_runner for debugging

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Removed path change patch

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Added -c 1  to onnx_test_runner

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Refactor MO python invocation in separate function

Cleans up Model Optimizer python invocation check and conversion
logic. Invokes MO only once in GetCapability() and passes the
IR strings (xml and bin) to the Compiler as meta-def attributes.

* Add comments

* code cleanup and comments

* Code cleanup for GetCapability

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Removed unnecessary files

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Revert "Added -v option to onnx_test_runner for debugging"

This reverts commit d1dd70938a94d648df1a1dbbc2e48d0b97e49ec8.

* Revert "Added debug statements for debugging CI error"

This reverts commit b86d41afed2aa29c3508155d6f9c8d3a7263cc60.

* incorporate Status Code changes

* ComputeFunc returns Status::OK() on success

* Use test names to disable tests for MYRIAD and VAD-R

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Rename local identifiers from CNNNetwork to OpenVINO network

CNNNetwork is an OpenVINO's API class that represents more than
just convolutional neural networks (CNNs). Renaming helps to avoid
confusion that the API's only support CNN type models.

* Added error message if building on windows

* Removed duplicate option in Cmake
* Removed unnecessary parameters in activation_opt_test

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Refactor Map search and access logic for efficiently and cleanliness.

* use C++ style casts

* Use os.path.join for python directory path operations

* use C++ style casts

* EP classes should use onnxruntime namespace

* Clean up fixes from PR comments

* Don't explicitly shutdown Py interpreter

* Remove debug print statements

Prints will be re-enabled later with a logging mechanism with
debug/verbose printing options.

* Decrement ref counts for used pyObjects

* Restore build instructions for other compilers

Content under the "Using other compilers" section has been
accidentally deleted by a previous commit. Restoring back that
content from the latest upstream repo.

* CMake code cleanup

Code clean up, commenting and formatting of CMake code.

* Don't pass the unused device_info parameter to OpenVINOGraph ctor.

* Add support for multiple I/O data types

Adds support for the following tensor data types for graph inputs
and outputs:
1) float
2) float16
3) int32
4) int16
5) int8
6) uint16
7) uint8

* cleanup setup.py module list definition

* Deduce index of input using tracked input index map

Ignores initializers in case they are ordered before inputs.

* Removed debug statement in MO code

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* PR feedback

* Removed per_sample_tolerance for openvino
* Removed unnecessary disabled tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Removed debug function

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled tiny_yolo_v2 due to accuracy issues

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Changed the disabled reason for broken tests

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Disabled Reshape with no input

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Python formatting with Autopep8

* Minor fix for MYRIAD devices

* Added zero dimension check

*Removed setting batch size for the network

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Set the threshold to larger value for MNIST

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Removed setting higher threshold in provider_test_utils

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>

* Check for --use_openvino in python wheel setup.py

Add openvino modules to the setup script for building the wheel
package only for --use_openvino a build option.

* Removed nullptr checks for GetNode()

Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2019-06-18 08:58:53 -07:00
Changming Sun
f22d1df04f
Fix a bug that constant folding doesn't check the returned value of OpKernel::Compute (#1243) 2019-06-18 07:45:09 -07:00
Ke Zhang
13d8558404
move environment.h/cc from framework to session project/folder. (#1241) 2019-06-17 18:01:21 -07:00
Ke Zhang
d448f39832
refactor a little bit to not ask every execution provider to give an implementation of getkernalregistry. It's not needed for a runtime-based exp actually. (#1231) 2019-06-17 13:50:07 -07:00
Ryan Hill
38963d81eb
Simplify some CustomOp code (#1206)
test_inference.cc reformatted with clang-format
2019-06-11 17:00:04 -07:00
Scott McKay
87d65389e6
Add ability to change the logging severity of the default logger. (#1165)
Add ability to set the session and run logger severity via SessionOptions and RunOptions
Inherit severity from the next logger up if logger severity isn't specified in SessionOptions or RunOptions
Expose ability to set default logger severity in python bindings.
2019-06-12 08:54:03 +10:00
Ryan Hill
3c3186c761
Convert more C APIs to return OrtStatus (#1194)
* Change SessionOptions APIs to always return a status, for consistency and ease of use (a couple returned 0 or -1 for success/failure)
2019-06-10 18:36:04 -07:00
Changming Sun
d8ac0d64d0
Make C API capable of defining CUDA custom ops (#1178)
Recreate the PR on behalf of Rui Xia, for #779
2019-06-06 13:45:32 -07:00
Ryan Hill
b68bb51dd0
Change SessionOptions APIs to always return a status (#1171)
* Change SessionOptions APIs to always return a status, for consistency and ease of use (a couple returned 0 or -1 for success/failure)
2019-06-06 13:24:24 -07:00
G. Ramalingam
b23ab6a06e
Implementation of sparse tensor (#1121)
* Initial implementation of sparse tensor

* minor cleanup

* minor cleanup (remove empty line)

* simplify template usage in test-case

* address linux build error

* fix constructor order to address compiler warning

* Address PR comments

* handle allocation in optimizer execution frame

* address compiler warning message and PR feedback comment

* address gcc unused warning for protobuf code

* address PR comment
2019-06-06 11:50:38 -07:00
Klein Hu
1a86421aff Create a syslog sink for logging in !Win32 env (#1163)
* Create a syslog sink for logging in !Win32 env

* Move syslog level logic to syslog_sink.c
2019-06-06 16:35:06 +10:00
Ryan Hill
148141dd5f Change Compute function to return a status code instead of an integer. (#1139) 2019-06-04 08:34:32 -07:00
Changming Sun
c18de6817b
Rename MLValue to OrtValue (#1154) 2019-06-03 17:29:55 -07:00
Du Li
05110a6558
Adding custom op ConvTransposeWithDynamicPads. (#638)
* Adding custom op ConvTransposeWithDynamicPads.

* Adding custom op ConvTransposeWithDynamicPads.

* adding cuda kernels

* fix a bug

* fix build issue.

* Integrate PR comments.
2019-05-31 11:48:43 -07:00
Ryan Hill
f9f6818e4c
Add comments and organize the C++ header into the main header plus a separate one of the inline methods. (#1130) 2019-05-30 14:24:25 -07:00
Ke Zhang
ef66395060
remove unnecessary lock and code clean up (#1114)
* refactoring the ep codes.

* remove unnecessary lock.

* fix the comment to claim KernelRegistryManager is not thread safe.

* clarify that APIs to add custom op in inferencesession is not thread safe.
2019-05-29 13:20:38 -07:00
Konstantinos Karanasos
ee6217972b
Fix when rewrite rule gets registered to multiple op types; update constness of rule methods; enable dropout elimination (#1098) 2019-05-24 13:47:55 -07:00
Ryan Hill
9129a652c5
Ryanunderhill/cxx api2 (#1091)
More C++ API improvements and cleanup
Add templates to tensor creation
Add run method that allows preallocated outputs
Simplify CreateTensor<T> to multiply by sizeof(T)
Convert io_types code
Optimize away vector copies in Session::Run
2019-05-24 11:15:51 -07:00
Ryan Hill
3a32b0eb99
Change function kernels to use CustomOp APIs (#1020)
* Change function signature
* Convert compute to use custom op style APIs
* Remove dead CustomOp function
* Use CustomOp API in TensorRT EP
* Switch to new API in ngraph
2019-05-20 14:57:43 -07:00
Changming Sun
2663b9c443
Remove unnecessary casts from OrtValue to MLValue(#1051) 2019-05-17 07:52:59 -07:00
Ke Zhang
a7039601c4
setting input/output for partitioned function subgraph (#1019)
* setting input/output for partitioned function subgraph

* fixed TensorRT related failure

* fix failures for tvm and ngraph

* update
2019-05-17 11:19:28 +08:00
Changming Sun
99556b111d
Make MemPatternPlanner on/off switchable in model weight loading (#989) 2019-05-16 14:39:09 -07:00
Changming Sun
e4225f8234
Combine OrtValue and MLValue into one type (#1043)
* Combine OrtValue and MLValue into one type
2019-05-16 10:22:49 -07:00
Changming Sun
5062be612e
update (#1041) 2019-05-15 16:41:41 -07:00
Changming Sun
e42099480e
Clean up code (#1033)
Some trivial changes for making gcc compiler happy. Won't impact runtime behavior.
2019-05-15 10:00:39 -07:00
Ryan Hill
3408494407
More C++ API improvements and conversions (#998)
* More C++ API improvements and conversions
* Mark more constructors as explicit
* Fix CSharp function name changes
* Change more test cases to use C++ API
2019-05-13 13:56:54 -07:00
Mika Fischer
c0acb8b6c3 Allow loading model from in-memory byte-array (#718) 2019-05-11 05:58:50 +08:00
Ryan Hill
f73ce305e9
C++ wrapper for ABI (#958) 2019-05-03 19:32:46 -07:00
Konstantinos Karanasos
feab3088fb
Conv(Add|Mul|BN)Fusion as rewrite rules (#863)
* Converted ConvAddFusion, ConvMulFusion, and ConvBNFusion to rewrite rules
* Extended graph_utils::RemoveNode
* Introduced RewriteRuleEffect enum
2019-05-01 13:23:29 -07:00
Scott McKay
0ad940027c
Use ConstPointerContainer for Node::ImplicitInputDefs() for better consistency with InputDefs() and OutputDefs(). (#894) 2019-05-01 14:22:28 +10:00
Konstantinos Karanasos
1b7d1f2645
Convert constant folding to a transformer (#866) 2019-04-29 18:12:49 -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
ybrnathan
b0a37477db Fix memory corruption issue when CPU->CUDA memcpy is involved (#879) 2019-04-22 20:21:14 -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
nivas-x86
a4d7052aeb Add nGraph Execution Provider (#832)
* Add nGraph Execution Provider

* feedback changes 1

* feedback2

* Feedback and upgrade nGraph

* Feedback 4

* Fix CI

* Disable new ops
2019-04-20 17:02:35 -07:00
Konstantinos Karanasos
ada90086f7
More efficient rule-based transformer (#815)
Introduce a quick pre-filtering of rules based on the node op types they are targeting.
The goal is to avoid evaluating all rules for all nodes. Instead, for each node, we will only be evaluating the rules associated with its op type.
2019-04-18 17:10:13 -07:00
shschaefer
ff253631b5
Enable use of session based threadpool. (#854)
* Enable use of session based threadpool.

* Fix build dir issue
2019-04-18 10:20:46 -07:00
Ke Zhang
951c428ee1
Simplify the validation in Run call (#850)
* Simpplify Run()

* remove the lock

* remove a file added wrongly.

* fix tests

* fix c# test
2019-04-18 08:38:17 +08:00
Ke Zhang
41dc3130f5
no need putting initializers (for constant node) into graph inputs. (#665)
* constant node should not be put into graph inputs any more.

* simplify graph input/output set logic.

* refactor comments.

* remove adding initializers as graph inputs when creating graph from scratch.
2019-04-17 07:38:08 +08:00
Ashwini Khade
14d63b5f45
generate transformers bug fix (#838)
* fix graph transformer generation

* add more tests

* cosmetic changes

* more changes per review
2019-04-16 14:10:33 -07:00
Tracy Sharpe
f19d9a4907
Reduce code size of kernel registration (#833)
Some changes that reduce the size of the release onnxruntime.dll by 170KB:

Change the ONNX_OPERATOR_KERNEL macros to not create a unique virtual class per kernel create lambda, but instead use a generic class with the raw function address supplied at BuildCreateKernelInfo time.

Changed the exceution providers to use a table driven approach to calling the BuildCreateKernelInfo functions instead of a massive function with construct/call/delete sequences.

The CreateFunc in data_types.h didn't need to be a std::function, eliminating more lambda virtual classes.

N.B. To accommodate MSVC 14.11 toolchain (used for CUDA builds), the operator+() syntax cannot be used to retrieve the raw function address. The older toolchain can't resolve between cdecl/vectorcall and gives up. An explicit cast is needed to help the compiler along.
2019-04-15 16:39:59 -07:00
Tracy Sharpe
c55e2de593
Status class optimizations (#824)
optimize onnxruntime::common::Status to reduce code size
2019-04-11 21:57:01 -07:00
Ryan Hill
fda1d0dce9
Ryanunderhill/ocr custom op (#744)
* Adding a custom op interface to the C API to remove shared library dependency.
* Remove old custom op test
* Rework how custom ops handle inputs/outputs to enable custom op output shape calculation in the compute method
* Add a nicer C++ API for custom ops and switch the tests to use it.
2019-04-05 18:53:20 -07:00
utsabsingharoy
36ed91ee9f CustomRegistry should use composition instead of inheritence
CustomRegistry should use composition instead of inheritence
2019-04-05 14:14:10 -07:00
Konstantinos Karanasos
512cfdd9fe
Generalize node removal (#743)
Generalize node removal method in graph_utils. This is a higher-level method that keeps the graph consistent so that no Resolve is needed after the removal of a node. 
The new method supports the removal of nodes with a single input (be it an incoming node or an initializer) and a single output (but allowing multiple output edges of that output). It also takes into account the case that one of the output edges is fed to a subgraph.
Also updated the rewrite rules to use this new, less restrictive method, and improved the rules' conditions. Introduced a GraphEdge struct to simplify various methods in graph_utils.
2019-04-03 22:34:20 -07:00
Ahmad El Husseini
e643ce0e08 Fix inconsistent dimension data type in C-API (#726)
* update dimension type

* update dimension type for items added after 0.2.1

* fix gpu build
2019-03-29 00:23:25 -07:00
Ashwini Khade
77b981824a
fix graph transformers and refactor tests (#696)
* fix graph transformers and refactor tests

* fix merge master

* Set default optimization level to Level1

* fix build warnings for Linux

* try root cause tensorrt test failures

* try root cause tensorrt test failure

* Test level2 transformers with  all CI builds

* remove ConvActivation fusion transformer

* change default level back to level1

* remove providers from apply api

* more changes
2019-03-26 20:38:12 -07:00
Konstantinos Karanasos
a872ba7894
Convert Unsqueeze elimination to rewrite rule + improvements in graph utils and graph transformer utils (#670)
* Convert unsqueeze elimination to rewrite rule

* Simplify the way we register predefined transformers and rules in the inference session (all details are now moved to the graph transformer utils)

* Some reorganization and renaming of methods in graph_utils

* Updates in graph transformers test

* Update in edge removal to not perform unnecessary check of node args that led to race conditions when updating the graph

* Improve documentation for rewrite rules

* Remove top-down rule-based transformer (given we currently have only one type of rule-based transformer)
2019-03-26 13:58:15 -07:00
Changming Sun
a26696fb0e Enable LTO on Linux 2019-03-22 15:30:37 -07:00
Ryan Hill
cd52431b8f
Custom op interface to the C API to remove shared library dependency (#668)
* Adding a custom op interface to the C API to remove shared library dependency.

* Fixup const issues

* Renaming to make things a little simpler

* Add a comment
2019-03-21 15:46:50 -07:00
Pranav Sharma
5d452b3029
Use protobuf-lite to reduce onnxruntime.dll size. (#639)
* Test protobuf-lite

* Test protobuf-lite

* Test protobuf-lite

* Optimize protobuf usage for LITE_RUNTIME to reduce the binary size of
onnxruntime.dll. More details can be found here https://developers.google.com/protocol-buffers/docs/proto.
The reduction is significant. For commit id: 4873b452151bafe49da332aaeab639ef0318fc1ca28d728, the size
reduced by ~700K; from 4873728 to 4172800.

* Add LITE_RUNTIME flag in in.proto files

* Fix merge conflict.

* Address PR comments

* Forgot to add 2 files + fix linux and gpu build errors.

* Fix build errors + test failures

* Fix cuda tests

* Fix tensor rt build

* Use full protobuf for trt

* Address PR comments

* Print tensor shape proto as text string for easier debugging
2019-03-21 14:06:38 -07:00
Scott McKay
a3499083da
Add iterator traits aliases to ConstPointerContainer::ConstIterator (#634)
* Add iterator traits aliases.

* Add a few more pieces to make more compliant with the input iterator requirements.
2019-03-21 15:45:58 +10:00
Ashwini Khade
2f1c3028b7
add capi to set graph optimization level (#657)
* add capi to set graph optimization level

* remove 1 unnecessary check + review comment

* plus updates
2019-03-20 17:14:46 -07:00
Scott McKay
17af8e9ba7
Add subgraph check/update to node removal logic. Fix a few minor issues with Graph that came up during testing of the changes. (#651)
* Check usage of node output as implicit input in any subgraphs.

* Add logic to check/update subgraphs when removing a node.
Fix some issues with Graph
  - Include local outer scope variables when validating. Required if calling Resolve on a subgraph
  - Include outer scope variables in the value info so the type information is captured. Also required to Resolve a subgraph but will detect a type mismatch (previously we threw the type information away).
  - Fix GraphNodes iterator so it can be used with std::find_if. Needed to be assignable so the end_ value can't be const.
2019-03-20 14:57:45 +10:00
Casey Carter
3f52de07c7 Add missing include to status.h
status.h must include <ostream> to use std::ostream.
2019-03-19 11:59:41 -07:00
Ryan Hill
da9af592d9 Remove OrtAppendCustomOpLibPath (#642)
* Remove OrtAppendCustomOpLibPath

* Fix parameter mismatch

* More parameter fixes
2019-03-18 19:44:32 -07:00
Ashwini Khade
481eb971ec
graph transformers update (#608)
* graph transformers update

* some updates

* plus changes

* more updates

* fixes per review comments

* enable tests

* adding more tests

* more changes

* update api in inference sesion

* changes per review

* Linux CI fix

* fix linux CI failure

* fix MAC CI failure

* more updates

* add more documentation and add level param to register transformer
2019-03-18 14:52:16 -07:00
Scott McKay
971058fc38
Avoid copy of pre-existing value to subgraph output (#637)
* Add AllocKind::kShare to allow copying the MLValue for a pre-existing value to a graph output when an Identity node is involved. Ideally we can make this handling for an Identity node more general purpose, however the current logic to free an MLValue during execution doesn't take into account a re-use point also needing a free. Due to that, limit the scope and start with a somewhat ugly hardcoded approach.

Migrate some changes from PR497

The existing Loop unit tests exercise the new code. Also manually stepped through the problematic model to verify the unnecessary copy was avoided.

* Fix build error

* Fix missing switch case in debug output of allocation plan

* Limit optimization to Loop
2019-03-19 06:55:59 +10:00
stevenlix
e8b0ae8923
Trt execution provider (#382)
* updated cmake files for trt

* added trt execution provider

* added trt basic test

* removed trt_path action attribute

* Add files via upload

* Update build.py

* Update trt_allocator.h

* fixed issues found by reviewers

* changed cast operator

* added comment for custom kernel implementation

* changed auto to auto&

* changed to function compile APIs for TRT execution provider

* changed to function compile APIs for TRT execution provider

* added new DType DInt64

* adapted to the changes of onnxruntime_c_api

* removed trt kernel (use function compile instead)

* updated onnx-tensorrt submodule

* set default memory type to TRT fused kernel

* resolve merge conflict

* fixed the issue that USE_CUDA conflicts with USE_TRT

* construct graph by adding nodes in topological order

* made changes for Windows

* change buffers type

* bypass HasImplementationOf check for TRT XP because TRT kernel is not registered

* added domain to version info in rebuilt model proto

* added trt to test option list

* added DomainToVersionMap() to GraphViewer

* removed Copy()

* fixed broken code

* format the code to clang format

* used local reference to the frequently used values

* fixed a couple of issues according to reviewers feedback

* fixed a couple of issues according to reviewers feedback

* added python binding for TRT and enable use_cuda when use_trt is on

* fixed a redefinition issue

* changed shared_ptr to unique_ptr on trt engines, and made a few changes required by reviewers

* enabled trtexecution provider for unit tests

* renamed trt to tensorrt

* added tesorrt to python binding

* update submodule onnx and onnx-tensorrt

* made a couple of minor changes based on reviewer's feedback

* added CUDA_CHECK

* removed test code

* fixed broken code after merge

* updated onnx-tensorrt submodule

* added post processing to align trt inputs/outputs with graph inputs/outputs

* updated onnx submodule

* added CUDA fallback for TensorRT and fixed TensorRT cmake issue

* added ci pipeline for tensorrt and removed some redundent code from trt xp

* fixed syntax issue

* updated onnx-tensorrt submodule

* fix trt build problem by: (#602)

1. Add additional /wd for debug build
2. Add io.h for additional targets
3. Bring back mb version of getopt

* Update install_ubuntu.sh

* Update linux-gpu-tensorrt-ci-pipeline.yml

* Update linux-gpu-tensorrt-ci-pipeline.yml

* Update run_build.sh

* Update run_build.sh

* Update run_build.sh

* Update run_build.sh

* fixed the issue that GetKernelRegistry returns nullptr

* merged master to this branch

* moved some data types to private

* fixed tensorrt CI pipeline issue

* customized test data for TensorRT pipeline

* added onnx-tensorrt in json file and fixed an issue in ci script

* added comments
2019-03-14 12:00:39 -07:00
Konstantinos Karanasos
2ae83c580c
Constant folding (#168)
Constant folding rewrite rule computes nodes that have only constant inputs at compile time and avoids these computations at run time.
2019-03-13 15:44:26 -07:00
jignparm
de9f1ff1ff Add new C function OrtOnnxTypeFromTypeInfo (#585) 2019-03-12 10:11:14 -07:00
Changming Sun
3ef273b84b Support memory mapping on Linux 2019-03-11 19:39:02 -07:00
Ryan Hill
af9c554dd3
Ryanunderhill/custom op (#550)
* Prototype version that demonstrates it can work
* Switched to OrtValue and removed the OrtCustomOpTensor code.
* Support multiple outputs and reading of attributes
* Add custom domain handling to custom ops
* Update documentation
* more wording changes
2019-03-06 19:09:55 -08:00
Scott McKay
0e65bfe7ae
Remove caching from InferenceSession::Run (#547)
* Remove caching from InferenceSession::Run

* Fix automatic merge of one file

* trigger rerunning checks
2019-03-06 14:29:42 -08:00
Changming Sun
8e0fff7b8d
Support large model(>2GB) (#520)
1. Support the new external data extension in ONNX 1.4 onnx/onnx#678
2. Enable onnxruntime_perf_test in Mac Build
3. move path_lib.h from onnx_test_runner source dir to onnxruntime_framework
4. Enable memory planner for string tensors
5. Make memory planner always enabled, to simplify model loading logic
6. Delete some duplicated code between onnxruntime_perf_test and onnx_test_runner
7. Delete win_getopt_mb lib.
8. Remove the dependency on Pathcch lib, which is only available on Windows 8 and newer.
2019-03-05 21:27:12 -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
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
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
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
Changming Sun
b69c834c06 Optimize graph partition 2019-02-20 16:32:04 -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
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
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
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
Changming Sun
4cdb0cbf6e A tiny fix in KernelCreateInfo 2019-02-06 17:59:20 -08:00
Changming Sun
7c70d9349a Fix a bug in execution_provider.cc 2019-02-06 17:08:38 -08:00
Weixing Zhang
851e291f22
Make OpKernelInfo not depend on SessionState. (#442) 2019-02-05 22:38:50 -08:00
Changming Sun
9faac70dae Delete Tensor's copy constructor 2019-02-05 16:38:27 -08:00
Weixing Zhang
696ab8a194
Create a separate component for graph optimization. (#421)
* Create a project for graph optimizer.

Move optimizer related code to the folder optimizer.

* Fix build failures.

* rebase and fix build failures.

* fix build failure.

* fix build failure with cuda path.

* fix python build failure.

* Move two transformers(memcpy and insert_cast) from framework to optimizer.

* rebase.

* SessionState should not depend on optimizer.
2019-02-04 15:45:12 -08:00
Scott McKay
f85cd520c0
Recurse into subgraphs in transformers and session initialization (#368)
* Add Recurse method to GraphTransformer.
Move GraphTransformer::Apply to ApplyImpl and make private.
Add non-virtual GraphTransformer::Apply method to handle calling Graph::Resolve in a more consistent manner.
Create MemcpyTransformer GraphTransformer to handle memcpy operations on subgraphs in a more standard way.

* Checkpoint

* Make the subgraph insert less verbose

* Add graph nesting level to transformer ApplyImpl
Tweak cast transformer to recurse nicely and avoid unnecessary Resolve calls by splitting out the duplicate removal into a separate transformer.
Decouple memcpy transformer from ExecutionProviders and minimise what's in the header.

* Recurse into subgraphs inside GraphPartitioner

* Update a couple of new transformers

* Check Recurse return value.

* Cleanup some memory management in inference session by moving some things into SessionState

* Add deleted flag to rewrite rules so we stop processing nodes that are removed.
Remove some (most likely) unnecessary Resolve calls. As we always call Resolve for a graph modified by a transformer there's generally no need for the transformer to do it.

* Minor cleanups.

* Add some extra usage information to the comments in GraphTransformer.

* Address PR comments
2019-02-02 06:03:00 +10:00
Scott McKay
efb72540be
Separate out constant node index information from ExecutionFrame (#410)
* Separate out the NodeArg index information from ExecutionFrame so it is only calculated once.

* Skip copy to/from device if only CPU execution provider is registered.
Cleanups.

* Address PR comments.
Clean up a few areas.

* Fix Linux build error
2019-02-01 10:55:49 +10:00
Konstantinos Karanasos
c76725da2d
Slice elimination rewrite rule; re-implementation of identity elimination using new Graph API (#87)
Rewrite rule that eliminates slice operators when they are redundant (i.e., when they preserve the whole input).
Re-implementation of the identity elimination rule using the latest Graph API.
2019-01-30 16:19:40 -08:00
Ryan Hill
09806625cf
Rename OrtInitialize to OrtCreateEnv in preparation for future. (#399)
* Rename OrtInitialize to OrtCreateEnv in preparation for future.
Add version number to structures

* Forgot about exports

* Update documentation
2019-01-29 15:03:18 -08:00
Ryan Hill
d875ab2acd
C API - Remove reference counting (#344) 2019-01-25 19:41:10 -08:00
stevenlix
8ea7197b82 trt (#361)
* updated cmake files for tensorrt
2019-01-23 13:28:13 -08:00
Scott McKay
8b55596dfe
The CUDA compiler doesn't support gsl::suppress so disable when __NVCC__ is defined. (#358) 2019-01-22 17:42:33 +10:00
Changming Sun
c87929e949 Use nsync for implementing condition variable 2019-01-21 22:59:42 -08:00
Ke Zhang
6831fc16ed Kezhan/kernel registry refine (#346)
* refactor kernel registry to make it a little bit more readable.

* update

* update cudaexecutionprovider

* fix build break

* fix comments

* fix build break
2019-01-18 09:55:30 -08:00
Scott McKay
9f3ae4279f Handle copy to/from non-CPU devices across control flow nodes (#339) 2019-01-17 10:51:23 -08:00
Changming Sun
c2704b5afb cleanup code (#343) 2019-01-16 17:12:22 -08:00
Ryan Hill
98a92547bf
Ryanunderhill/c api 8 (#297)
* Make OrtAllocator not be reference counted

* Make the allocator interface more type safe

* Fix build break

* Build break fix

* Build break fix

* Mistake in previous build fix.

* Fix review comments + build break

* Missed the export symbols

* C specific error, need 'struct' keyword in one case.

* Function calling OrtReleaseObject instead of OrtReleaseEnv
2019-01-10 02:06:29 -08:00
Changming Sun
5e113661a9 Build system upgrades (#281)
* update

* runas normal user
2019-01-07 13:15:24 -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
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
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
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
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
Ryan Hill
773114a4f1
More C header naming changes (#202)
* More Ort prefix changes for consistency

* Fix C# methods

* More C# fixes
2018-12-18 11:39:46 -08:00
edgchen1
71c56b6d7c Fix array feature extractor out of bounds access issue (#194)
* Fixed out of bounds access in ArrayFeatureExtractor.

* some cleanup

* Updated tensor_shape.h comments.

* Updated macro name.

* Added copy assignment, move assignment/ctor to TensorShape.

* Removed i64 literal suffix.

* Fixed test.

* Fixed type of x_num_dims.
2018-12-18 00:30:07 -08:00
Ryan Hill
11b369a864
Abbreviate ONNXRuntime as Ort in all of our public APIs (#175)
Applies to all public headers and macros, plus many internal ones. There are still some internal things with OnnxRuntime in the name, but this fixes all public functions & macros.
2018-12-14 14:54:23 -08:00
Ryan Hill
d419170c7b
Rename ONNXRUNTIME_API_STATUSCALL to ONNXRUNTIME_API_CALL since it's … (#165)
* Rename ONNXRUNTIME_API_STATUSCALL to ONNXRUNTIME_API_CALL since it's just for calling convention, there's no status return value implied.

* Missed a function
2018-12-13 14:42:51 -08:00
edgchen1
c5a0119d42 Added Environment::IsInitialized() and added check to InferenceSession constructor. (#169) 2018-12-13 13:34:49 -08:00
Ke Zhang
9baaf5e956
Kezhan/change edge api to use index (#138)
* remove input edges while removing a node.

* put comments on how to remove a node without using resolve.

* fix test failure

* fix test failure.

* fix format

* try to guess and fix mac ci failure.

* change add remove edge api.

* update IR

* update comments

* fix comments.
2018-12-12 14:30:55 -08:00
Yuan Yu
f189b76f9a Some small edits and renaming. (#153) 2018-12-11 16:36:39 -08:00
Ke Zhang
830c341c19
remove graph editor since it's not designed as expected to restrict graph access for rewrite rule. (#119) 2018-12-06 14:10:51 -08:00
Ryan Hill
eea7618d53
Ryanunderhill/c api (#85)
* Unify all C API header files into a single file.
Remove Ptr suffix and use '*' syntax directly.
2018-12-05 14:03:45 -08:00
Tang, Cheng
dd1b16dd58
add brainslice change in common folder (#109) 2018-12-05 13:48:51 -08:00
Ke Zhang
005f9dca96
Kezhan/renaming graph_base.h to graph.h (#95)
* rename graph.h to graph_viewer.h

* rename graph_base.h to graph.h
2018-12-04 13:25:39 -08:00
Ke Zhang
a78acb2d2c
rename graph.h to graph_viewer.h (#84) 2018-12-04 08:41:03 -08:00
Pranav Sharma
b7cc611563
Minor documentation changes (#78) 2018-12-03 12:55:29 -08:00
linkerzhang
e00c956254 update the comments. 2018-11-29 17:54:30 -08:00
linkerzhang
35f94cac27 remove const cast from conv related fusion. 2018-11-29 17:45:44 -08:00
Scott McKay
bd50598d17 Document the Graph header files and cleanup some issues. (#42)
* Checkpoint.

* Add doco to graph.h and graph_base.h.
Change NodeConstIterator to return a reference to clearly advertise no nullptr's are going to be returned as it's only iterating valid Nodes.
Fix some code analysis warnings.

* Make a couple of APIs return a reference instead of a pointer as they never return nullptr.

* More doco and some minor naming cleanups.

* Cleanups
Couple more consistency changes.

* Fix CUDA test file

* Fix invalid line.
2018-11-28 08:42:11 -08:00
Ryan Hill
a9b52f399d
Add pre-release notice to c_api (#38) 2018-11-27 18:06:00 -08:00
Pranav Sharma
7aef8a1cca Sync with internal master. 2018-11-22 20:56:43 -08:00
Pranav Sharma
89618e8f1e Initial bootstrap commit. 2018-11-19 16:48:22 -08:00