Commit graph

2823 commits

Author SHA1 Message Date
Pranav Sharma
1f1384f8a9
Update dependency introduced by fuzzing change. (#4438) 2020-07-06 21:56:40 -07:00
Tianlei Wu
eabf6dc9ee
Add Fusion for GPT Attention with both past state and attention mask (#4437)
Add Fusion for GPT Attention with past state and attention mask
2020-07-06 19:37:37 -07:00
gwang-msft
7baf374939
Change the input to NNAPI EP ModelBuilder from ModelProto to GraphViewer (#4389)
* init version to use graph instead of model_proto for IsOpSupported

* move add to modelbuilder to use graph node

* move the rest of model_builder to use graph instead of modelproto

* remove redundant code

* Clear some redundant code

* merge master and some minor style changes

* move check if an initializer is external to individual op instead the whole graph

* Addressed comments

* Change the GetType and GetShape to log waring info inside to simplify the caller, remove some redundant onnxruntime namespace

* add squeeze op support, some more code style clean up

* fix a bug where duplicate output can be added to a subgraph, some other minor logging changes
2020-07-06 18:44:04 -07:00
EronsJ
632b2896f3
Onnxruntime fuzzing (#4341)
* Add protobuf mutator library as a git submodule

* Added files and instructions to build the protobuf mutator library in CMake

* Added fuzzing flag to build system and added fuzzing dependency library. To run fuzzing test use the flags --fuzz_testing --build_shared_lib --use_full_protobuf --cmake_generator 'Visual Studio 16 2019'

* Added src files and build instructions for the main fuzzing engine

* Removed Random number generation test from inside the engine

* Added license header to files

* Removed all pep8 violations introduced by this change and other E501 violations
2020-07-06 16:34:34 -07:00
Cecilia Liu
ec35a1b514
Remove unused initializer in graph after embed fusion (#4436) 2020-07-06 16:04:02 -07:00
Tracy Sharpe
3ef449816c
MLAS: support prepacking APIs for quantized GEMM (#4433)
Add support for prepacking matrix B for use in the quantized GEMMs.
2020-07-06 15:20:10 -07:00
Ashwini Khade
dd73e8c016
add function initialization back to graph resolve (#4434) 2020-07-06 15:17:27 -07:00
liqunfu
0fdb1e9f60
Liqun/roberta (#4408)
add GLUE Roberta example, fix unused initializer issue at backend. Bert GLUE expected out updated due to graph changes between June29 to July1st
2020-07-06 09:19:30 -07:00
Christian Goll
3588484336
use system libnsync (#4377)
* use system libnsync
2020-07-06 07:53:22 -07:00
KeDengMS
77cf51b13c
Fix symbolic_shape_infer for Resize with roi (#4426)
Should only apply roi when coordinate_transformation_mode == tf_crop_and_resize
2020-07-05 23:37:36 -07:00
jornt-xilinx
0d4a65eede
Fix Vitis-AI EP for memory info into IAllocator move (#4404) 2020-07-05 09:00:26 +10:00
pengwa
8bcdefc9c1
Optimize GatherND (#4097)
* Optimize GatherND
* Refine the code, Fix few comments
2020-07-03 19:42:32 +08:00
Weixing Zhang
bd11ab6816
Optimize LayernormGrad (#4156)
* Draft for LayerNorm Optimization

* Modify LayernormGrad kernel based on new backward graph.

* keep two LayernormGrad implementations.

One is implemented based on input X, mean. The other is based on output Y, scale, bias. The first one is enabled by default. The second one can be enabled by --use_invertible_layernorm_grad

* expose use_invertible_layernorm_grad to frontend.

* add fp16 tests.

Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
2020-07-02 22:09:30 -07:00
Weixing Zhang
33e06be4ac
optimize transpose CUDA kernel (#4233)
* optimize transpose

* optimize for the case when the tensor is 3D and the permutation is done in last two dimension.

BERT-L throughput is improved ~1.4% from transpose optimization

* fix UT MegatronSelfAttentionPartitionCorrectnessTest

* polish code.

* add test and change tile size to 16x16 for better perf.

* fix UT

* fix test of mask_rcnn

* address code review comments.

Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
2020-07-02 22:05:32 -07:00
edgchen1
dba22b17b4
Update BiasGeluGradDxKernel and tests. (#4400)
For BiasGeluGradDxKernel:
- Implement optimization to first load from global memory into registers as suggested by Weixing.
- Support larger bias sizes which were previously limited by the number of threads per block.
- Address flaky unit test by increasing the error tolerance to the default value.
2020-07-02 18:55:44 -07:00
Tracy Sharpe
93d4964727
Use single OpKernel for u8u8 and u8s8 types (#4414)
Combine kernels for u8u8 and u8s8 types.
2020-07-02 18:23:58 -07:00
Pranav Sharma
4df8a1e240
Use the file size while reading onnx models. Ensure models are loaded using APIs in model.h for consistency. (#4399)
* Use the file size while reading onnx models. Ensure models are loaded using APIs in model.h for consistency.

* Refactor existing GetFileLength in posix.cc and address PR comments.

* Fix linux build - signed/unsigned conversion
2020-07-02 17:30:53 -07:00
Scott McKay
d22f6fddf7
Add ability to specify just the device when using IOBinding for an output (#4386)
* Add ability to specify just the device when using IOBinding for an output. This enables keeping an output on a different device GPU when it has a dynamic size that is not known ahead of graph execution.
2020-07-03 09:26:47 +10:00
Vincent Wang
28e4c0edf5
Keep loss_scale and Whole Loss Subgraph in FP32 during Mixed Precision Training (#4268)
* Keep loss subgraph as FP32 when mixed-p training.

* Fix case where there is no white-list loss op.

* Get nodes from loss_scale instead of whitelist.

* rename const variables.

Co-authored-by: Vincent Wang <weicwang@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-07-03 06:54:56 +08:00
suffiank
7a05b3ca87
Increase python packaging pipeline timeout (#4412)
* increase python packaging pipeline from 90 to 110 min

* change timeout to Linux GPU and do 120 min to match Win GPU
2020-07-02 15:38:39 -07:00
Yufeng Li
67a7d93b49
Fuse MatMulInteger and scale followed (#4350)
* Fuse MatMulInteger and scale followed

* Add bias
2020-07-02 13:08:21 -07:00
Tiago Koji Castro Shibata
10c25416bb
Remove use of RTTI in CUDA provider (#4410) 2020-07-02 12:44:17 -07:00
Hariharan Seshadri
eabc1616e6
Rename variable in InferenceSession class so as to not clash with an existing var (#4391)
* Rename variable in InferenceSession class so as to not clash with an existing var

* Fix build break
2020-07-02 12:27:14 -07:00
suffiank
f6bf66c8cf
Adjustments to MPI and NCCL library discovery on build (#4407)
* cmake edits for mpi_home and nccl_home

* cmake syntax error on else
2020-07-02 12:03:42 -07:00
dependabot[bot]
f4e0070c2e
Bump mysql-connector-java from 8.0.15 to 8.0.16 in /tools/perf_util (#4401)
Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.15 to 8.0.16.
- [Release notes](https://github.com/mysql/mysql-connector-j/releases)
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.15...8.0.16)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 11:22:45 -07:00
gwang-msft
0bef9d5114
Fix the broken Android NNAPI CI (#4403)
* Change NNAPI CI to run on new NNAPI EP

* update android ci to mac 10.15 and remove in install cmake

* update the android ci to targe android api level 29

* remove unnecessary ndk install git submodule call
2020-07-02 10:22:18 -07:00
Ashwini Khade
ef602835b0
update getfunctionbody (#4396) 2020-07-02 09:00:37 -07:00
Changming Sun
3bb6a865cc Revert "remove openmp and scipy from build pipelines (#4305)" 2020-07-02 00:30:02 -07:00
S. Manohar Karlapalem
4c0236d6c1
Update MCR container instructions with dynamic device selection info (#4371) 2020-07-01 22:16:55 -07:00
Tracy Sharpe
5c23b17196
MLAS: more prepacking kernel changes (#4397)
Kernel changes to support StrideK>128
2020-07-01 22:09:42 -07:00
Sherlock
2d54c89d77
Update filename and Cleanup unused cudnn kernels (#4387)
* Update filename and Cleanup unused cudnn kernels

* Cleanup unnecessary dependency
2020-07-01 17:19:49 -07:00
Yang Chen
010445fc52
handle Floor and SplitToSequence (#4384)
* handle Floor and SplitToSequence

added support to Floor and SplitToSequence ops

* Address CR

use sympy.floor for computation on Floor
2020-07-01 16:09:43 -07:00
Yufeng Li
473cd5545f
Simple support of MatMul U8S8 on ARM to pass tests (#4392) 2020-07-01 15:18:02 -07:00
Bowen Bao
7ec9a73202
deprecate frontend layernorm postpass (#4372) 2020-07-01 13:06:03 -07:00
Tiago Koji Castro Shibata
7fea332f93
Support builds without RTTI (#4333)
* Support builds without RTTI

* Disable RTTI in all builds
2020-07-01 13:05:35 -07:00
liqunfu
5dcb9b4858
Liqun/backprop deterministic graph (#4315)
make gradient graph deterministic
add to session option use_deterministic_compute.
2020-07-01 12:39:10 -07:00
Zhang Lei
94c98aa0a7
qlinaradd for arm/sse2/avx2 using intrinsic, enable binary broadcasting parallel (#4216)
* Support quantization linear binary element wise math ops, implement QLinearAdd.
Support tests for quantization linear binary element wise math ops, implement test for QLinearAdd.
Add QlinearAdd with SSE2 intrisinc implemntation, Avx2 assembly implemntation, Neon intrisinc support.
QLinearAdd support VectorOnVector, VectorOnScalar, ScalarOnVector.
Generalized QlinearBinaryOp parallel related with broadcasting.

* Modify according to PR feedbacks. Mainly:
    * template helper for generalize the qladd logic on v2v, s2v, v2s
    * remove GetKernel related.
    * change mixed lagecy MM/SSE code in the AVX code
    * formater, typos, convensions, etc.

* Utilize MlasSubtractInt32x4 in MlasDequantizeLinearVector().

* Some format fix.

* More nature parallel parameter type.

* Fix build break for x86.

* Comment goes to 80 before wrap.

* Many change on assembly on Marco related.
Using vminps than vpminsd to handle NaN.
tested on windows.

* Using CLang Format to format the file.

* Fix arm32 build error.

* Remove some duplicate in different #if defined

* working add.u8.vector to vector

* Fix runtime bus error on real arm32 linux.

* fix typo in store last one lane.

* arm32 qlinearadd handle scalar.

* Move qladd to seperate c++ file

* Add neon64 qladd.

* refactor some, enhance two instructions on arm64 only instructions

* Fix typo for arm64

* use strict op in pure c++ (min/max on float value)

* sse2 new version.

* mrege arm/sse2/avx2

* pass arm/sse/avx2 linux test

* remove non-used assembly file.

* Remove unused data definition and tailing spaces.

* Fix broadcasting parallel issue.

* Enhance broadcasting scenarios. Allow testing result diff due to round
on half.

* Add Mlas or MLAS_ prefix for namespace safety.

* Handle alignment issue for arm32 for GCC/MSVC. remove some unused
signed/unsigned int ops.

* Specify /arch:AVX2 for qladd_avx2.cpp

* Fix type during copy/paste when unrolling. Better one GreatEqual
condition. Better formater by splitting two statements on single line.

* Arm neon alignment parameter is bits rather than bytes, change it.

* Move qladd_avx2.cpp to intrinsics/avx2/ folder

* Formatting using mlas style.

* Double check mlas style for these files.

* change indent 2 to 4 for qladd_avx2.cpp

* Fix windows x86 build error due to sse2 no _mm_cvtsi128_si64

* To re-trigger all as old failed pipeline updated.

Co-authored-by: Lei Zhang <phill.zhang@gmail.com>
2020-07-01 11:54:44 -07:00
Dmitri Smirnov
49268c42da
Change the way java home is set on Mac OS for CI and Java publishing pipeline (#4385)
* Change the way java_home is set on Mac.

* Change the way JAVA_HOME is set on Mac OS
2020-07-01 07:37:14 -07:00
Sherlock
6365760906
BiasDropoutFusion (#4167)
* Implement BiasDropout Fusion and Kernel

Dropout kernel for residual input

BiasDropout Fusion to take residual input

Fix BiasDropout Kernel

Optimize DropoutGrad with 4 elements per thread

* Add graph transformer UT

* MLTypeCallDispatcher for RatioData

* Use MLTypeDispatcher for ratio tensor

* Handle traing_mode input for BiasDropout fusion

* Add test case for missing ratio input

* Replace using FinalizeNodeFusion

* Make BiasDropout kernel template-less

* Make DropoutGrad template-less

* Make Dropout and TrainableDropout template-less

* Regenerate onnx file for UT

* Minior fix on divmod in BiasDropoutKernel

* Adjust pt frontend test due to dropout randomnesss

* Make dropout kernel opeartion in fp32

Co-authored-by: Sherlock Huang <bahuang@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-06-30 15:43:14 -07:00
Ashwini Khade
0404763f23
Update function body initialization for ONNX functions (#4332)
* Update function body initialization

* minor fix

* changes per review comments

* minor fix

* format fix

* add function initialization in mixed precision transformer

* more updates

* more fixes
2020-06-30 14:30:59 -07:00
Cecilia Liu
37b624b688
Match More EmbedLayerNormalization Patterns for Bert Model Graph Fusion (#4354)
match more embed patterns for bert base cased
2020-06-30 13:12:50 -07:00
Tracy Sharpe
755675541a
NCHWc + Sigmoid optimization (#4360)
Add support to avoid reordering NCHWc tensors due to the Swish activation (x * sigmoid(x)) in EfficientNet/EfficientDet models.
2020-06-30 10:50:58 -07:00
ytaous
4380b8ba68
adjust bs size (#4375)
Co-authored-by: Ethan Tao <ettao@microsoft.com>
2020-06-30 10:29:48 -07:00
Ashwini Khade
89c6da99b5
fix output shape calc for matmul (#4362) 2020-06-30 08:21:20 -07:00
Faith Xu
a4127fc185
Add stale bot (#4323)
* Add stalebot

* Update exemptLabels
2020-06-30 01:51:09 -07:00
Tianlei Wu
55f25a4bbf
Update Attention op to support attention mask for GPT-2 (#4330)
* Support another two format of mask_index input: 2D attention mask, or 1D mask index with end and start positions.
* Update dynamic axes of gpt2 with past state
* Update script to fuse model with attention mask
2020-06-29 23:26:23 -07:00
Weixing Zhang
2601f8e1b4
Support to build CUDA EP for NV Ampere GPU (#4345)
Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
2020-06-29 21:46:13 -07:00
Hariharan Seshadri
465140b384
Misc fixes to Conv and ConvTranspose CUDA kernels (#4281) 2020-06-29 16:07:42 -07:00
Changming Sun
35a048ef9b
Ignore one failed test in DML (#4366)
2020-06-29 08:51:32.9157882 [E:onnxruntime:Default, runner.cc:452 DataRunner::RunTaskImpl] keras2coreml_Dense_ImageNet:output=output1:expected 0.233292 (3e6ee400), got 0.231783 (3e6d587b), diff: 0.00150879, tol=0.00123329 idx=52. 1 of 255 differ
2020-06-29 14:27:06 -07:00
gwang-msft
5f4e63ede6
Add nhwc support for NNAPI EP, add concat op, handle concurrent calls to NNAPI model (#4356)
* add support to internally transpose nchw input to nhwc and only transpose back if it is necessary

* more changes in nchw<->nhc, fixed small issue in concat

* Add option for NNAPI to run on [all device]s/[cpu onl]y/[non-cpu only]

* minor code style changes
2020-06-29 11:55:45 -07:00