Commit graph

206 commits

Author SHA1 Message Date
Dmitri Smirnov
ce7a180f21
Import more featurizers with tests (#2685)
Advance commit to 4df80d5865a9d4e97f6d0b9304d4316115a04d9e
  Add generated code for the commit before editing.
  Import more featurizers.
  Rename Automl ops domain to mlfeaturizers.
  Rename conditional compilation macro.
  Move and rename files getting rid of automl
  Rename --use_automl build switch to --use_featurizers
  Rename CMake option accordingly. Rename automl CMake targets.
  Adjust CI and packaging pipeline switches.
  Rename namespace automl to featurizers.
2019-12-17 22:17:40 -08:00
Dmitri Smirnov
d34fb62012
Introduce container type runtime checks and other improvements (#2522)
Rework TensorSeq in a manner consistent with Tensor and SparseTensor
  in terms of type system setup.
  Reduce templating. Introduce helpers to ensure the same
  data type.
  Make OrtValue __dtor not virtual.
  Introduce ContainerChecker
2019-12-04 16:04:17 -08:00
Xiang Zhang
3e7aaf8fa1 User/xianz/telemetry (#2458)
* enabme telemetry

* enable telemetry

* set enable telemetry as default

* for debugging

* remove log and set disable telemetry as default back

* delete private file while testing

* resolve comment: mainly add license header, rename macro and update docs

* rewording in privacy.md
2019-12-03 23:34:53 -08:00
Sreekanth Yalachigere
31ea11a696 Renaming MKL-DNN as DNNL (#2515)
* DNNL: Moving Files to rename file names

* DNNL name change

* azure pipeline updated

* disable ceil/dialation and enable Opset10

* disable ceil/dialation tests in Python

* mlperf_ssd_resnet34_1200 disabled
2019-12-03 07:34:23 -08:00
Tianlei Wu
e57b735bb9 Add a transformer to use Gelu approximation for cuda provider (#2480)
* Add Gelu Approximation Transformer to convert Gelu or AddGeluFusion to FastGelu to get better inference performance.
2019-11-27 10:15:50 -08:00
Yulong Wang
e29fb5cef1
Add BatchParallelFor, TryParallelFor, TryBatchParallelFor into ThreadPool (#2476) 2019-11-27 00:32:26 -08:00
Scott McKay
4cac18f666
Optimize CPU Transpose for a single axis moving (#2461)
* Optimize CPU Transpose for one axis moving either inwards or outwards. We have optimizations for NCHW <-> NHWC in CUDA but not CPU. This provides a more generic optimization to the CPU implementation.

Tested performance in both directions with data sizes of 8, 16, 32 and 64 bits, size of axis being moved of 3, 16 and 32, and number of elements to move of 100x100, 300x300 and 1000x1000.

Across all tests the average improvement even with the overhead of python was 2.5x. No cases were slower. Some were 6x faster.

Binary size increase in RelWithDebInfo build is ~5K.

NOTE: See PR comments for details of performance comparison with Eigen. Eigen is slightly faster but increases binary size by 55K just for support of rank 4 input. Binary size would be further increased to support different ranks.
2019-11-26 14:05:44 +10:00
shahasad
ca0ed96621
CSharp api and test for loading custom op shared library (#2420)
- Added C-API test for loading custom op shared lib.
- Made some changes in C++ api header and C-api implementation to get it working.
- Added C# API and corresponding test for loading custom op shared library.
2019-11-21 15:45:49 -08:00
Changming Sun
109b3cb450
Avoid using the default logger in the graph lib and optimizers (#2361)
1. Use the session logger if it is available.
2. Don't disable warning 4100 globally. We should fix the warnings instead of disabling it.
2019-11-14 13:23:28 -08:00
Changming Sun
fc6773a65b
Add Tracelogging for profiling (#1639)
Enabled only if onnxruntime_ENABLE_INSTRUMENT is ON
2019-11-11 21:34:10 -08:00
Dmitri Smirnov
25b3c51661
Introduce PrimitiveType into a Type System along with an integer constant (#2307)
Improve perf by avoiding GetType<T>() calls. Introduce MLTypeCallDispatcher to switch on Input Type. Add Tensor IsType<T>() fast method.
2019-11-08 17:47:06 -08:00
mikecaraman
358b517d49 [v2] Add ACL (Arm Compute Library) execution provider (#2258)
* Guard unused parameter

Guard unused parameter for Linux Arm and other cases.

* Add ACL (Arm Compute Library) execution provider

Add a new execution provider targeting Arm architecture based on Arm Compute Library.
Validated on NXP i.MX8QM CPU with ResNet50, MobileNetv2 and VGG models.
All unit tests are passing.

Comparative performance improvements for ResNet50v1 model obtained with
onnxruntime_perf_test:
		A72	2xA72	A53	4xA53
ACL vs CPU  	16%	9%	21%	13%

Usage documentation available in ACL-ExecutionProvider.

* Fix eigen unused parameter

Fix eigen unused parameter error for Arm cross-compilation.
2019-10-31 12:25:36 -07:00
Changming Sun
67755adfd8 Bug Fix: NodeArg class has a move constructor but doesn't have a move assignment operator 2019-10-31 10:29:54 -07:00
Scott McKay
47f40ca204
Cleanup add/remove of initializer (#2274)
* Cleanup add/remove of initializer

* Address PR comments
2019-10-30 06:50:41 +10:00
edgchen1
8be48f47dd
Added Graph::ReplaceInitializedTensor() function. (#2230)
Added Graph::ReplaceInitializedTensor() function to support updating existing initializers.
2019-10-24 19:30:24 -07:00
Ryan Hill
7b4e6636f8 Add default params to Env C++ constructor (#2246) 2019-10-24 17:20:11 -07:00
Ryan Hill
77d8d6f767
Remove the OrtApiBase base_ member from OrtApi (#2242)
* Remove the OrtApiBase base_ member from OrtApi

* Forgot about C#
2019-10-24 11:36:23 -07:00
kile0
bede664af7 mimalloc allocator (#2071) 2019-10-23 22:34:00 -07:00
Scott McKay
41d55ea274
Update the GraphProto for subgraphs when saving the Graph. (#647)
* Update the GraphProto for subgraphs when saving the Graph. This is required to produce a valid overall Graph if the Graph has been optimized.
2019-10-23 15:14:06 -07:00
Ryan Hill
6fca8b0a94 Move CXX API global into the header (#2228) 2019-10-23 14:15:53 -07:00
edgchen1
856c6cae0a Edgchen1/endian utils (#2181) 2019-10-21 22:28:35 -07:00
Scott McKay
3cda9f717b Relax shape inferencing error handling if model uses an old opset (#2199) 2019-10-21 10:51:22 -07:00
Paul McDaniel
d1159b7008 Adding platform telemetry (#2109) 2019-10-19 18:25:57 -07:00
Ashwini Khade
fc3c168402
Graph Optimizations Doc (#2050)
* Initial draft

* updates per review

* fix link

* plus one more link fix

* small changes to the optimizer documentation

* some more changes

* done

* update C_API with doc link
2019-10-18 08:03:40 -07:00
Changming Sun
13f8b49d58
Fix kernel registry bug (#2137) 2019-10-17 23:10:54 -07:00
Scott McKay
3fcb4ee7d4
Refine optimizers (#1407)
* Refine optimizers

* Address PR comments

* Changes from PR comments and discussion.

* Fixed signed/unsigned mismatch

* Address PR comments

* Address PR comments

* Fix linux build

* Fix issue with mkldnn logic.

* Turn off optimizers by default for operator unit tests.

* Handle edge case of graph with no nodes in partitioner so all execution providers don't need to.

* Comment out change to turn off optimizers for unit tests. Add details on what needs to be done to re-enable.
2019-10-15 14:49:59 -07:00
Adrian Tsai
4090d0d0de
Add DirectML Execution Provider (#2057)
This change adds a new execution provider powered by [DirectML](https://aka.ms/DirectML).

DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning on Windows. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers.

The DirectML execution provider is capable of greatly improving evaluation time of models using commodity GPU hardware, without sacrificing broad hardware support or requiring vendor-specific extensions to be installed.

**Note** that the DML EP code was moved verbatim from the existing WindowsAI project, which is why it doesn't yet conform to the onnxruntime coding style. This is something that can be fixed later; we would like to keep formatting/whitespace changes to a minimum for the time being to make it easier to port fixes from WindowsAI to ORT during this transition.

Summary of changes:
* Initial commit of DML EP files under onnxruntime/core/providers/dml
* Add cmake entries for building the DML EP and for pulling down the DirectML redist using nuget
* Add a submodule dependency on the Windows Implementation Library (WIL)
* Add docs under docs/execution_providers/DirectML-ExecutionProvider.md
* Add support for DML EP to provider tests and perf tests
* Add support for DML EP to fns_candy_style_transfer sample
* Add entries to the C ABI for instantiating the DML EP
2019-10-15 06:13:07 -07:00
Pranav Sharma
91db840b6b
Introduce execution mode enum for clarity and extensibility; Change Python, C and C# APIs accordingly; Removed EnableSequentialExecution, DisableSequentialExecution in favor of the more general SetExecutionModeAPI. (#2098)
* Introduce execution mode for clarity and extensibility; Change Python APIs accordingly; Replace DisableSequentialExecution API with EnableParallelExecution for clarity.

* Fix cuda build

* Modify the test slightly

* Make C and C# APIs consistent with Python.
2019-10-14 09:48:19 -07:00
Scott McKay
eb24617d2e Add ability to get symbolic dimension info for graph inputs and outputs. (#2051)
* Add ability to get symbolic dimension info for graph inputs and outputs.
WIP to get initial feedback.

* Fix linxu build error.
Update C# API and add unit test

* Clarify the two different ways Tensor shape and type info is created. One is from concrete values and one is from a type proto where symbolic dimensions may exist. Doing so allows a change to default to empty strings for the symbolic dimensions if not provided.
2019-10-12 15:46:28 -07:00
Scott McKay
50faab308b
Remove 'Ort' prefix from OrtAddFreeDimensionOverride for consistency. (#2099) 2019-10-12 06:11:29 +10:00
Ryan Hill
e8e33977da
Ryanunderhill/customop dll (#2002)
* Add OrtApiBase
* Add RegisterCustomOpsLibrary API
2019-10-11 11:12:51 -07:00
Scott McKay
bdfff800ea Move access to intra-op threadpool into OpKernelContext. (#2091) 2019-10-11 10:36:20 -07:00
Scott McKay
db0dd09ded
Cleanup some aspects of the Initializer class used by optimizers (#2005)
* Move check on data type outside of the Initializer class as it's specific to Conv processing.
Use references for arguments that can't be null.
2019-10-09 10:37:44 +10:00
Pranav Sharma
ea60469af5
Support seq(tensor), implement 2 sequence ops that use the new type. (#1983)
* Mention OrtCreateSessionFromArray in C API doc

* fix seq of tensors

* changes on 9/30

* All tests passing

* Add SequenceAt op

* Fix shared_lib non_tensor_types test

* Address some PR comments

* Address PR comments

* Add support in python bindings to accept seq(tensor)

* Change data type from vector<Tensor> to TensorSeq

* Change data type from vector<Tensor> to TensorSeq

* Added some documentation

* Added missing test model

* Fix Linux build

* Fix Mac build

* Fix Mac build
2019-10-07 15:35:09 -07:00
Scott McKay
e58827fa62
Add Unique operator. (#1900)
* Add Unique operator.
* Enable onnx tests. Disable one with incorrect expected output and add unit test to validate ORT behavior. Need onnx update to fix (will address that separately but don't want to block this checkin on that change).
2019-10-04 22:11:55 +10:00
Dmitri Smirnov
627f853a44
Downgrade compiler to CentOS 4.8.5 (#1985)
Make onnxruntime CPU build and run on CentOS GCC 4.8.5
2019-10-03 15:40:46 -07:00
Dmitri Smirnov
d1b1cdc5c4
Replace GSL with GSL-LITE submodule and fix up refs (#1920)
Remove gsl subodule and replace with a local copy of gsl-lite
  Refactor for onnxruntime::make_unique
  gsl::span size and index are now size_t
  Remove lambda auto argument type detection.
  Remove constexpr from fail_fast in gsl due to Linux not being happy.
  Comment out std::stream support due to MacOS std lib broken.
  Move make_unique into include/core/common so it is accessible for server builds.
  Relax requirements for onnxruntime/test/providers/cpu/ml/write_scores_test.cc
  due to x86 build.
  Add ONNXRUNTIME_ROOT to Server Lib includes so gsl is recognized
2019-10-01 12:43:29 -07:00
Scott McKay
bd2d6af9ca
Filter out info from non-const initializers during shape inferencing (#1806)
* Don't return shape for non-const initializer in InferenceContextImpl::getInputType
Don't return initializer for non-const initializer in InferenceContextImpl::getInputData
Update graph_utils to support these scenarios
  - fix GetConstantInitializer to make sure a name is for an outer scope value before checking a parent graph, as local name could shadow an outer scope initializer.
2019-09-26 13:44:33 +10:00
jywu-msft
686bd36210
Remove ml_status.h, add StatusCode to pybind exception mappings (#1889)
* initial checkin.

* add onnxruntime status code to ort pybind exception mapping.

* address review feedback.
2019-09-24 11:13:14 -07:00
Pranav Sharma
1a3ded6a7b
Add C API for free dim override, fix missing API mention in InferenceTest.cs, fix confusing print statement in perf_test. (#1884)
* Mention OrtCreateSessionFromArray in C API doc

* Add C API for free dim override

* Add C API for free dim override, fix missing API mention in InferenceTest.cs, fix confusing print statement in perf_test.

* Remaining C#files

* fix c# build

* Run the tests in blame mode. This option is helpful in isolating a problematic test causing the test host to crash.

* fix order
2019-09-23 17:58:20 -07:00
Ryan Hill
5781222456
Ryanunderhill/api interface (#1855)
* Convert ABI to a versioned interface.
* Convert ORT_THROW_ON_ERROR to inline function to fix link errors.
2019-09-20 13:39:11 -07:00
Adrian Tsai
a7beed798e Implement L1 graph transformer for free dimension override (#1825)
* Implement FreeDimensionOverrideTransformer

* Add test

* Fix compiler warnings

* Update comment

* LOGS_DEFAULT

* Merge from master
2019-09-20 10:52:14 -07:00
Dmitri Smirnov
6a9ae65f41
Expose GetOverridableInitializers via Python and C/C++ API (#1878)
Implement GetOverridableInitializers()
 Add unit test for initializer override.
Expose in Python and C/C++ API
2019-09-19 15:43:28 -07:00
Pranav Sharma
a9ce941579
Refine threading control options and move inter op thread pool to session state. (#1841)
Description: Refine threading control options and move inter op thread pool to session state.
Added thread_utils.h/cc to centralize the decision around the thread pool size under various conditions.

Motivation and Context
Currently the thread pool size of the parallel executor is hardcoded to 32 for some reason. This PR makes the options to configure the thread pool sizes clearer.
2019-09-18 22:36:23 -07:00
KeDengMS
80bda77203
Fix symbolic shape inference for faster_rcnn, mask_rcnn, yolov3 (#1867)
* Fix symbolic shape inference for faster_rcnn, mask_rcnn, yolov3

Force merge when --auto_merge, on symbolic dims which sympy cannot simplify
Add symbolic inference for Resize opset 10
Add support for step != 1 in Slice
Add support for computed dim in TopK
Bug fixes in passing symbolic dims from subgraph
Fix an outdate comment in Nuphar provider header
2019-09-18 14:18:32 -07:00
Bowen Bao
8712a523a4
Bump onnx to latest (#1756)
* Bump onnx to latest

Update onnx.in.proto with changes for SparseTensor.

* add temp skip tests

* remove passed tests from skip list

* skip more tests for new ops in opset 11

* skip crashing tests

* update handling of new attribute types sparse tensor and sparse tensors

* advance onnx commit and remove skip cpu_flaky_tests

* temporarily skip yolo3 model test due to resize opset10 shape inference regression

* update proto for onnxruntime server

* advance onnx commit further
2019-09-12 11:46:49 -07:00
Pranav Sharma
f8c3442880
Part 2 of renaming AllocatorInfo to MemoryInfo. (#1804)
* Mention OrtCreateSessionFromArray in C API doc

* Part 2 of renaming AllocatorInfo to MemoryInfo.

* pr comments

* fix comment
2019-09-12 08:19:29 -07:00
Dmitri Smirnov
fe8915863c
Implement C API entry points for creating and fetching non-standard types to OrtValue (#1714)
C/C++ Opage APIs
 Add new virtual interfaces for NonTensorType
 Implement entry points.
 Add shared header for the data container.
 Add export symbols.
 Add serialization/deserialization.
 Implement model with Opaque types.
 Rework opqaue_api_test as a standalone executable.
2019-09-11 14:52:47 -07:00
Scott McKay
3b7f047a49
General performance testing tooling improvements (#1577)
* Miscellaneous updates to help with perf testing
2019-09-11 19:46:59 +10:00
Pranav Sharma
f9d85d654a
Add GetDataTransfer() interface in the EP. (#1773)
* Mention OrtCreateSessionFromArray in C API doc

* Add GetDataTransfer() interface in the EP.

* Check return status of RegisterDataTransfer

* Address PR comments
2019-09-10 14:07:17 -07:00