Commit graph

49 commits

Author SHA1 Message Date
Edward Chen
aa60a8368f
Update type reduction operator type usage processors set. (#6976) 2021-03-11 09:22:53 -08:00
Edward Chen
b6c4a7ac54
Support required types when excluding typed registrations (#6871) 2021-03-08 08:22:07 -08:00
jingyanwangms
f22f04a109
Add comment (#6860)
Co-authored-by: Jingyan Wang <jingywa@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-03-02 18:54:25 -08:00
Edward Chen
ee35be0129
Support specifying globally allowed types from build script (#6677)
Add initial support for constraining operator kernel implementations (which support this type-granularity) to a set of allowed types from scripts.
2021-02-22 14:05:00 -08:00
Scott McKay
02c7873b0e
Update ORT model conversion script to support custom ops (#6701)
* Add support for custom ops library to the ORT model conversion script
Simplify model conversion now that we read ops from the ORT format model.
Enable custom ops in the python bindings if custom ops are turned on in a minimal build.
* Add test of model conversion involving custom ops.
2021-02-17 12:52:39 +10:00
Chun-Wei Chen
115e16b37b
ort_test_utils: skip creating input if it is an initializer (#6544) 2021-02-05 17:34:08 -08:00
Scott McKay
c5d2538314
Add more kernels that have typed registrations to the operators we track type usage for. (#6565) 2021-02-05 15:10:54 +10:00
Scott McKay
c49d1dbc4b
Add type reduction support to Slice and Transpose (#6547)
* Add type reduction support to Slice and Transpose
2021-02-05 11:08:23 +10:00
Scott McKay
6cb8f8c812
Support disabling a typed kernel registration that uses the output type (#6530)
* Update infrastructure to support disabling a typed kernel registration that uses output 0 for the type (vs. the normal use case of input 0).
2021-02-03 14:22:32 +10:00
Scott McKay
8d53ef69e5
Add type reduction support to Min, Max and Pow (#6519)
* Add type reduction support to Min, Max and Pow
Update the C++ type reduction infrastructure to allow specifying an opset for the supported types list, as those can change across opset versions.
Minor updates to the type usage tracking script
* Add 'all opsets' macros and constant
2021-02-03 06:51:35 +10:00
Scott McKay
c84bb9df9f
Add ability to track per operator types in reduced build config. (#6428)
* Add ability to generate configuration that includes required types for individual operators, to allow build size reduction based on that.
  - Add python bindings for ORT format models
    - Add script to update bindings and help info
  - Add parsing of ORT format models
  - Add ability to enable type reduction to config generation
  - Update build.py to only allow operator/type reduction via config
    - simpler to require config to be generated first
    - can't mix a type aware (ORT format model only) and non-type aware config as that may result in insufficient types being enabled
  - Add script to create reduced build config
  - Update CIs
2021-01-29 07:59:51 +10:00
Edward Chen
042053c55e
Add support for running Android emulator from build.py on Windows. (#6317) 2021-01-13 19:21:49 -08:00
Scott McKay
30c7fffbab
Expand the documentation on using compiling EPs with a minimal build (#5893)
* Expand the documentation on using compiling EPs with a minimal build to call out a 'simple' option that is easier to use. Provide more background on what happens to help users choose the best option for them.
Tweak conversion script to be noisier about attempted usage of 'all' optimization level.

Co-authored-by: manashgoswami <magoswam@microsoft.com>
2020-12-02 09:12:36 +10:00
Scott McKay
f0142da59c
Add NNAPI to providers that can be used via the python bindings. (#5867)
Update ORT model conversion script
  - add args for specifying optimization level and whether to use NNAPI
  - add logic to create a list of required ops and ORT format model that can be used with NNAPI
2020-11-21 09:18:35 +10:00
Edward Chen
bef06dac93
Automatically clean up build docker image cache. (#5843)
Follow up to #5811 to automate cleanup of the build docker image cache.
Added a script and build definition to clean up docker images that haven't been accessed recently.
2020-11-20 11:56:26 -08:00
Edward Chen
71e7c2b423
Cache build docker images in container registry. (#5811)
This PR adds infrastructure to automatically cache docker images used in CI builds in a container registry.

Currently, build images are pulled from a container registry for some builds and built every time for others. The container registry requires maintenance to keep the images up to date and building images every time wastes build agent resources.

With this change, a given build image can be looked up in a cache container registry and if present, pulled, and otherwise, built and pushed. The uniqueness of a build image is determined by a hash digest of the dockerfile, docker build context directory, and certain "docker build" options. This digest is part of the image tag in the cache container repository.

The cache container registry will need to be cleaned up periodically. This is not automated yet.
2020-11-17 17:02:24 -08:00
Chun-Wei Chen
5bd7241839
Raise output mismatch error in ort_test_dir_utils.py (#5364) 2020-10-02 16:44:59 -07:00
Ashwini Khade
3f00b8db8f
move all experimental ops to version 1 of ms domain (#5287)
* move all experimental ops to version 1 of ms domain

* deprecate TransposeMatMul in favor of FusedMatMul

* update documentation
2020-09-30 14:50:18 -07:00
Scott McKay
1ff3b2d5b8
Add ability to generate multiple test dirs so that different input mixes can be tested. (#5310) 2020-09-29 12:55:15 +10:00
Changming Sun
17f1178c2e
Downgrade GCC (#5269)
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
2020-09-24 21:14:54 -07:00
Guoyu Wang
78a29aebbc
[ORT Mobile] ORT Minimal E2E CI (#5200)
* Modify the ort minimal CI to ort minimal e2e ci
2020-09-19 18:43:22 +10:00
Scott McKay
c46a480306
Update conversion script and process to simplify creating ORT format models and a minimal build (#5217)
* Update conversion script and process to simplify creating ORT format models and a minimal build.
2020-09-18 18:49:54 +10:00
Scott McKay
796ddeb2cb
Remove serialization of outer scope value info in ORT format model (#5077)
* Remove serialization of outer scope node arg info in ORT format model. We don't currently need it in a minimal build as only SessionState calls Graph::IsConstantInitializer and it doesn't search outer scope. If we do need it in the future the information can be calculated at runtime (small binary size cost to do so).

Motivation: ORT format model was 32% bigger for a BERT model with multiple levels of subgraph and a lot of nodes due to this. Size is about 5% larger of the original ONNX model with the change. ORT format has type/shape info for all nodes, and this model has 2000 nodes so this seems reasonable.

Added example code to dump ORT format model to json.

Fixed misc bug in python test script around handling float and non-float expected output.
2020-09-08 17:43:42 +10:00
Scott McKay
b5c2932ae8
Last major set of ORT format model changes (#5056)
* Add minimal build option to build.py
Group some of the build settings so binary size reduction options are all together
Make some cmake variable naming more consistent
Replace usage of std::hash with murmurhash3 for kernel. std::hash is implementation dependent so can't be used.
Add initial doco and ONNX to ORT model conversion script
Misc cleanups of minimal build breaks.
2020-09-05 07:59:01 +10:00
Bowen Bao
73456f10cd
Fix contrib ops unregister to match pytorch behavior (#5052) 2020-09-03 16:32:42 -07:00
Bowen Bao
22ba266bd6
Add flag to _internal_use to control export of contrib ops in ort trainer (#4968) 2020-09-03 09:11:47 -07:00
Scott McKay
28445c88f9
Changes to enable saving and loading an ORT format model (#4995)
* Changes to enable saving and loading an ORT format model via the public APIs.
Cleanup session.py to try and make slightly more understandable. More refactoring is needed here.
Couple of bug fixes

* Fix bug in handling NodeArg serialization for optional inputs which has a name and no type info.

* Address PR comments
  - tweak SessionOptions config to avoid double lookup
  - merge duplicated functionality in python binding around registering an EP with optional options

Fix a couple of build issues.

* Update C API to be consistent with python API
  - only load model in InferenceSession ctor if required
  - support loading ORT model in minimal build

* Fix nodejs test.
We get an invalid path error from LoadInterOp first now

* Another attempt at fixing nodejs test.
Error message depends on whether ENABLE_LANGUAGE_INTEROP_OPS is defined. Make the output consistent.

The interop implementation looks suspicious given it appears to be internal code that is going via the public api. TBD if that should be fixed.

* Fix couple of build issues.

* Disable test temporarily so PR can be checked in.
Will fix in separate PR that adds final pieces for minimal build as the test is required there.

* Give up on nodejs test and make the match simpler.
Fix init call in TrainingSession python to not pass through sess. it wasn't being used in Session anyway so passing it through just adds confusion.

* Fix call to Session.__init__ in TrainingSession.
Session now initializes Session._sess to None to make it clearer where the 'ownership' of that member is, and that needs to happen before TrainingSession sets it.
2020-09-03 09:10:48 -07:00
Nat Kershaw (MSFT)
8a03b6e5c7
Render Operator documentation as compliant markdown (#3658) 2020-09-02 15:07:50 -07:00
Ksenija Stanojevic
ea37a4d89b
Add Trilu custom op (#4537)
Co-authored-by: neginraoof <neginmr@utexas.edu>
2020-08-17 14:42:26 -07:00
gwang-msft
db475c4f35
Add option for onnx_test_runner can pause after launch, make create_test_dir work on non-windows os (#4618)
* minor fix for test dir util

* add pause option for onnx_test_runner

* add flush std to show pause prompt text

Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-07-29 11:47:01 -07:00
Negin Raoof
37cbe8551d
Adding export registration and tests for custom ops (#4248) 2020-06-25 22:29:02 -07:00
edgchen1
63bf587623
Use azcopy to download test data (#4221)
Use azcopy from download_e2e_test_data.py, add helper function for downloading azcopy.
Update download_test_data.py to use helper function.
2020-06-16 10:14:34 -07:00
Yulong Wang
2b3ce1b090
add script to support update nodejs binding version (#4164) 2020-06-09 13:12:55 -07:00
Wenbing Li
ee35320974
The fixings for python scripts in ONNXRuntime (#4135)
* The fixings for python scripts in ONNXRuntime

* update according the comments
2020-06-08 10:27:32 -07:00
Scott McKay
5e0928a777
Enable running PEP8 on python scripts using flake8 (#3928)
* Enable running PEP8 checks via flake8 as part of the build if flake8 is installed.
Update scripts in \tools and \onnxruntime\python. Excluding \onnxruntime\python\tools which needs a lot more work to be PEP8 compliant. Also excluding orttraining\tools for the same reason.
Install flake8 as part of the static_analysis build task in the Win-CPU CI so the checks are run in one CI build.
Update coding standards doc.
2020-05-15 07:15:06 +10:00
Scott McKay
0cdc1459c6
Add a few more things to the helper python scripts. (#3842)
* Add a few more things to the helper python scripts.
Add documentation with usage examples.

* Address PR comments
2020-05-12 09:59:40 +10:00
Scott McKay
42cf971ca2
Add a couple of utility scripts to tools/python (#3621)
* Add a helper script to more easily create a test directory for use with onnx_test_runner or onnxruntime_perf_test.
Add example script that can be used as a base for performance testing a model with a variety of input sizes.
Add __init__.py so files in this directory can be imported in other scripts.

* Fix some flake8 warnings.
Add example of specifying attribute for op.

* Add ability for test dir creation to fill in all missing input data with random values.
Add example of using test dir creation this way
2020-05-02 17:35:43 +10:00
Hariharan Seshadri
b4457ecb7a
Fix gen_doc build option and refresh documentation (#3545)
* Support listing keys in custom metadata map via C/C++ API

* nit

* PR feedback

* Nit

* Initial commit

* More changes

* Support listing keys in custom metadata map via C/C++ API

* nit

* PR feedback

* Nit

* Initial commit

* More changes

* Add md files

* Doc changes

* Update

* revert cmake changes

* Update

* Doc change

* Update

* Update
2020-04-17 14:41:04 -07:00
Yufeng Li
baa86f181f
Handle the case that initializers are in graph input (#3449)
warn that initializers are in graph input
provide a tool to move initializer out of graph input
Motivation and Context
ONNX model from IR_VERSION 4 only treats initializers that appear in graph input as non-constant. This may fail some of the graph optimizations, like const folding, operator fusion and etc. Warn the case and provide a tool.
2020-04-14 09:06:04 -07:00
Tiago Koji Castro Shibata
cff266e1b9 Fix cgmanifest.json generating script (#2770)
* Fix protobuf submodule name

* Workaround pygit2 bug
2020-01-14 14:59:07 -08:00
Scott McKay
7a5de9c958
Add a python script with a number of helper actions for creating/editing/dumping onnx test runner format pb files (#2294)
* Add a python script with a number of helper actions for creating/editing/dumping onnx test running format pb files.
2019-11-01 06:39:14 +10:00
Scott McKay
6699c19010 Add script to find if optimizer updates are required due to onnx operator updates. (#1957)
* Add script to find calls to graph_utils::IsSupportedOptypeVersionAndDomain where the latest supported version is prior to the latest defined version.
2019-10-21 11:38:30 -07:00
shahasad
0c5d2c998b
Generate documentation from the registered operator kernels (#1395)
- Added python script for generating markdown doc from the registered opkernels. 
- Made some conditional changes in the pybind to expose necessary python API
- Added some missing type-constraints in the op kernel registrations
2019-08-14 18:12:24 -07:00
Hariharan Seshadri
c5f2f0f15b
Upgrade version number for ORT in preparation for release (#1468)
* Update version number to 0.5.0 in preparation for release

* Update to README.md to direct to Versioning doc

* Resolve PR comment

* Remove incorrect line generation

* Minor updates to update version script

* Minor comment update
2019-07-23 16:33:06 -07:00
Colin Versteeg
5ee0f185dc Add GRPC support to ONNX Runtime Server (#1144)
* add grpc

* add-submodule

* Revert "add-submodule"

This reverts commit e35994b25035ce310a98909658582bff759ee358.

* fix submodule

* IT BUILDS

* Initial commit of prediction_service_impl.cpp

* Server builds and runs!

* add request id, health and reflection. GRPC is done

* enable channelz for monitoring

* GRPC unit tests

* clang format

* add unit tests

* Add function tests for GRPC

* add grpc to model_zoo_tests

* revert update protobuf to 3.7.0

* update submodules

* builds but runs some gflags tests which fail

* get build working

* confine build changes to onnxruntime_server.cmake

* update build files

* code reveiw comments

* Maik's code review comments

* update cares version to fix compilation issue

* update build to fix c-ares

* code review comments

* update cgmanifest.json

* remove extraneous file

* Klein comments.

* update ci based on discussions for go dependency

* fix tag issue

* fix build issues

* remove stray submodule

* update dockerfile and build script

* dynamic linking changes

* update build script

* code review comments

* update dockerfile

* update script for mount

* code review comments
2019-07-18 11:10:38 -07:00
shahasad
306453f9d6
fix the link to the script in the doc. fix some error messages (#960) 2019-05-02 19:21:41 -07:00
shahasad
2c46fff69a
Enable gen-doc on windows CI (#716)
* add --gen_doc to ci_build

* make gen-doc conditional to build/test step

* some fix in the git diff check

* some more trick on doc diff

* updated for input/output

* updated the contrib operator doc

* fix on missing input output descriptions

* fixed the problem of missing doc string, due to protobuf optimization

* fix

* revert last change

* moved gen_doc.py to /tools/python

* fixed typo
2019-05-01 14:58:21 -07:00
RandySheriffH
0995e853fa
Rashuai/unify version (#653)
* unify version logic

* merge function to build.py

* read file to get version

* fix path issue

* format python

* use path join

* fix __init__.py

* move function to a separate file

* remove redundant
2019-03-21 13:44:13 -07:00
Scott McKay
b7298a6deb
Add python script to export subgraphs from Scan/Loop/If nodes in an ONNX model. (#583) 2019-03-08 14:51:30 -08:00