Commit graph

3299 commits

Author SHA1 Message Date
Hariharan Seshadri
e1ed0fde2b
Prevent registering both DML and CUDA EPs in an ML op test (#5078) 2020-09-08 11:13:50 -07:00
Olivia Jain
8d91d4ff36
Build docker image instruction fix (CUDA) (#5070) 2020-09-08 09:59:16 -07:00
Scott McKay
6c33e95b88
Fix signed/unsigned mismatch on x86. (#5079) 2020-09-08 18:37:18 +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
e03a391895
Small updates to ORT Mobile documentation (#5075)
* Few documentation clarifications

* Few more tweaks
2020-09-08 11:02:31 +10:00
Scott McKay
36dc057913
Add unit test for C# setting of session options config entry. (#5073)
Make error message slightly more user friendly.
2020-09-07 20:15:33 +10:00
gwang-msft
5d60d57ce2
Add csharp API for AddSessionConfigEntry (#5072)
Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-09-05 21:40:38 +10:00
Pranav Sharma
2c1410afe7
Remove usage of macros for constants in public header. (#5061)
* Remove usage of macros for constants

* Fix linkage issue
2020-09-05 01:27:20 -07:00
gwang-msft
6081c1cfa2
Update ONNX to latest (#5069)
* Update ONNX to latest

* update onnxml.cs

* revert changes in proto and cs files

* add broken test

* update broken tests

* update broken tests

Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-09-05 00:49:09 -07:00
gwang-msft
d922cb1081
Add sequence and map support in ORT mobile file format, add UT (#5066)
* Init change

* Update schema header

* Address review comments

* fix for DISABLE_ML_OPS build break

* Fix build break

Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
2020-09-04 21:33:48 -07:00
liqunfu
de58720a97
Liqun/transformer test and e2e golden numbers (#5064)
* match new/old api numbers

* new golden numbers for Roberta and MC

Co-authored-by: liqun <liqun@OrtTrainingDev4.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-09-04 18:11:37 -07:00
Vincent Wang
84de14a833
Register OpSet13 CUDA Kernels for BERT/UniLMv2 (#4856)
* opset13 cuda kernels for BERT.

* add opset13 SoftmaxCrossEntropyLoss.

* opset13 size.

* fix argmax/min for ut.

* fix ut failure for argmax/min.

* OrtMemTypeCPUInput

Co-authored-by: Vincent Wang <weicwang@microsoft.com>
2020-09-05 08:09:52 +08:00
Changming Sun
370d194db7
Add a docker file for CI build CUDA 10.2 (#5065) 2020-09-04 16:28:45 -07:00
Zhang Lei
ec88f14a7a
Implement QLinearMul in mlas (#4593)
* Implement QLinearMul
2020-09-04 15:02:19 -07: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
Du Li
6134994db9
Parallelizing elementwise kernels (#4577)
* Parallelizing unary elementarywise ops.

* Parallelizing binary elementwise ops.

* Accommodating PR comments.
2020-09-04 14:45:43 -07:00
Xiang Zhang
0dad79b495
Add SetLanguageProjection C Api and use it in four projections (#5023)
* Add SetLanguageProjection C Api and use it in four projections

* static cast enum languageprojection to uint32_t

* resolve comments

* fix typo and line added unintentionally

* revert unecessary change

* reorder c# api

* add TensorAt and CreateAndRegisterAllocator in Csharp to keep the same order as C apis
2020-09-04 14:26:39 -07:00
Bowen Bao
6dd4af3936
Fix initializer name only when wrapper is applied (#4920)
* Fix initializer name only when wrapper is applied

* fix inspect import
2020-09-04 12:08:07 -07:00
Ryan Hill
d792af776d
Remove Cuda dependency from TensorRT shared provider (#5014) 2020-09-04 11:35:02 -07:00
Zhang Lei
78bb53381b
optimize resize op for NN mode for some fasterrcnn model (#4825)
Also Add test case for 5-D. Disable 5d test for Cuda Provider.
2020-09-04 10:35:36 -07:00
Zhang Lei
8289981f0e
Implement QLinearSigmoid. (#5015)
Refactor QLinearLeakyRelu using QLinearLookupBase.
Paralleling the lookup phase.
2020-09-04 09:37:17 -07:00
Thiago Crepaldi
0fc9c504fe
Re-enable CI tests for the new PyTorch frontend (#5017)
This PR includes:

* Re-enable CI tests for new PyTorch frontend
* Re-enable fp16 and adjust tolerances for number matching
2020-09-04 09:36:24 -07:00
Andrews548
bd215b79a2
ACL v20.02 (#4981)
* Add ACL version 20.02

* fix loging typo

* check depthwise operation based on group param

* Generate ArmNN runtime inside class constructor

* Update to the latest ONNX operation set

* Update BUILD.md

Co-authored-by: Andrei-Alexandru <andrei-alexandru.avram@nxp.com>
2020-09-03 20:44:27 -07:00
Bowen Bao
73456f10cd
Fix contrib ops unregister to match pytorch behavior (#5052) 2020-09-03 16:32:42 -07:00
Nat Kershaw (MSFT)
d7502eff8f
Add nodejs samples README (#5005) 2020-09-03 15:58:44 -07:00
xkszltl
4b9b5b6146
Imported protoc cannot have compile options. (#5030) 2020-09-03 15:20:00 -07:00
Sergii Dymchenko
d7984fe6ba
Add packages from training docker to cgmanifest. (#5033) 2020-09-03 13:11:41 -07:00
liqunfu
bb13b52291
to allow parallel training with mpi4py (#4942)
to allow parallel training with mpi4py
Co-authored-by: liqun <liqun@OrtTrainingDev4.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-09-03 12:47:12 -07:00
Thiago Crepaldi
9388d49c0d
Add warning to non pickable models (#5037) 2020-09-03 11:53:56 -07:00
Thiago Crepaldi
9d1bdef195
Update CODEOWNERS and minor docstring fix (#5002)
This PR includes:

* Previous CODEOWNERS was encompassing more files than just training files
* Polynomial optimizer config is missing part of its docstring
2020-09-03 11:52:38 -07:00
Suffian Khan
546965c2da
Add deterministic path for AllReduceL2 (used to compute gradient norm) (#5027)
* add deterministic path for reduce l2

* add unit tests

* memset zero size off by one

* eliminate windows warning as error

Co-authored-by: suffian khan <sukha@OrtTrainingDev1.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-09-03 10:02:41 -07:00
Ashwini Khade
9ba2cfb71b
fix py packaging pipeline (#5038)
* add test skip logic when opset > allowed opset

* fix attribute error

* plus fix
2020-09-03 09:32:10 -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
Tim Harris
bbb9d92a5f
Remove SchedulingParams variants of ThreadPool::TryParallelFor (#5050) 2020-09-03 09:04:31 -07:00
gwang-msft
fde7a2c848
Temporarily switch SafeInt to a fork for an option to disable exceptions (#5041)
* Removed submodule

* Add safeint fork
2020-09-02 23:21:39 -07:00
Ryan Hill
e0d1cf19a6
Fix allocator bug (#5042) 2020-09-02 21:21:18 -07:00
Weixing Zhang
3268717615
Enable TF32 for training on A100 (#4914)
* enable TF32 for training on A100

it can be disabled by env: NVIDIA_TF32_OVERRIDE = 0
2020-09-02 19:21:54 -07:00
Hariharan Seshadri
a9db287bd7
Return windows error code for library loading and unloading failure (#5036) 2020-09-02 18:07:36 -07:00
Ye Wang
b4e9e98cee
Add more huggingface models in benchmark tools (#4986)
* checkin more huggingface models

* review comments

* review comments
2020-09-02 16:41:58 -07:00
Sherlock
a935731bd3
Neg Gradient (#5022)
Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-09-02 15:54:17 -07:00
Dudeldu
4a0f6595eb
Enable metadata and signature changes in graph transformers (#4783)
After applying all the graph transformations the metadata and signature could have changes
(e.g.: new outputs got added, or the outputs/inputs got renamed). Therefore the local
copies of metadata and signature, that InferenceSession administrated for faster lookup, has to be updated.
For this the `SaveModelMetadata`, that now has to be idempotent, should be called after resolving the transformed graph
2020-09-02 15:46:36 -07:00
Hariharan Seshadri
4fd4b74149
Change session option values if they don't work with EPs being registered for the session (#4991) 2020-09-02 15:13:23 -07:00
Nat Kershaw (MSFT)
8a03b6e5c7
Render Operator documentation as compliant markdown (#3658) 2020-09-02 15:07:50 -07:00
Dmitri Smirnov
e1901a7e10
Improve performance of CUDA implementations for GatherElements and Greater, Equal and Less (#4989)
Make GatherElements kernel process 16 items each.
  unroll the constant loop. Quit loops early for zero dividend.
  Optimize Binary CompareFunction and remove Impl_Cast invocation.
2020-09-02 10:17:39 -07:00
Changming Sun
d5d5e37e76
Build system enhancements (#5012)
1. Add a docker file for CUDA11
2. Support setting CUDA_ARCHITECTURES from command line.
2020-09-02 10:13:26 -07:00
Thiago Crepaldi
aabed34d5c
Fix checkpoint API and improve loss scaler handling (#4950)
This PR also includes:
	* More LossScaler tests
        * Minor LossScaler improvement
	* Check model after extra post processing
	* Improve basic training tests to include all optimizers
	* Set rtol=1e-7 tolerance for Legacy vs Experimental frontend API tests
	* Increase number of training tests for Legacy vs Experimental tests
	* Minor refactoring on existing tests
        * Fix Checkpoint API for Gradient Accumulation / fp16 scenarios
2020-09-02 09:38:02 -07:00
Thiago Crepaldi
eebc2cccce
Fix fetches when eval_step's input is a subset of train_step's input (#4966)
This PR also includes MNIST sample using the new forntend as a sample
2020-09-02 08:57:44 -07:00
Vincent Wang
a6e219deff
Pass Model Path to TensorProtoToMLValue from Constant Folding for External Inputs (#5000)
* Don't constant fold external inputs.

* pass model_path to TensorProtoToMLValue

Co-authored-by: Vincent Wang <weicwang@microsoft.com>
2020-09-02 21:54:40 +08:00
gwang-msft
5651c23271
Fix for Android ORT android initOsArch exception (#5006) 2020-09-02 00:48:06 -07:00