Commit graph

6111 commits

Author SHA1 Message Date
Changming Sun
7b63d1102b
Fix some warnings in orttraining code (#10009) 2021-12-13 15:28:21 -08:00
Gani Nazirov
c82160bbd0
Add AtenOp at:bitwise_or (#9662)
* Add AtenOp at:bitwise_or

* Specify overload name for bitwise_or

* undo unnecessary import

* set output element type to BOOL

* Add broadcasting support

* Fix test

Co-authored-by: Gani Nazirov <ganaziro@OrtTrainingDev4.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Gani Nazirov <ganaziro@microsoft.com>
2021-12-13 14:36:15 -08:00
Rajalakshmi Srinivasaraghavan
ad99dff298 POWER10: Update builtins for DGEMM
This patch changes builtin names in DGEMM based on endianness order.
Also changing some casting style in SGEMM and DGEMM code for POWER10.
2021-12-13 21:43:01 +00:00
Edward Chen
5d821b5bd9
Address null dereference warning in div_grad_impl.cu. (#10010) 2021-12-13 13:26:56 -08:00
Abhishek Jindal
777a80fbc1
Abjindal/eager onnx operators fix (#9968)
* adding view operator changes

* adding the slice operator definition

* moving to opgen script for slice op and removing redundant steps in view op and reshape_copy

* adding for at definition

* adding for at::infer_size definition

* changing template style for reshape_copy to ensure int64_t type
2021-12-13 13:23:46 -08:00
George Nash
d0b08af37a
Implementation of QAttention for the DNNL execution provider (#10004)
* Add QAttention to DNNL EP

Add QAttention to DNNL EP (limited support and disable for gpu)

update ONEDNN version to 2.4.4

bug fix in getcapability

add memory debug print

Signed-off-by: Wang <zhaoyang.wang@intel.com>

* Address Code Review + MatMulInteger Fix

clean up code and add comments

fix matmulinteger and add fusion rule to enable initialized vector weight zero
points of 0s

update DNNL_TAG to v2.5

Signed-off-by: Wang <zhaoyang.wang@intel.com>

* Linux Compile Fix + rollback ONEDNN to 2.4.4

Signed-off-by: Zhaoyang Wang <zhaoyang.wang@intel.com>

* Fix QAttention Debug build

Signed-off-by: Wang <zhaoyang.wang@intel.com>

* Fix QAttention build if USE_DNNL not specified

Signed-off-by: George Nash <george.nash@intel.com>

Co-authored-by: Wang <zhaoyang.wang@intel.com>
Co-authored-by: MTC <63478620+jeyblu@users.noreply.github.com>
2021-12-10 21:50:13 -08:00
Zhang Lei
787755328b
Add s8s8 for depthwise qconv 3x3 5x5 (#10008)
* Add depthwise conv s8s8 routine for 3x3 5x5 on arm64. And its testcase.

* fix some comments.
2021-12-10 17:52:51 -08:00
Nat Kershaw (MSFT)
b4434c7694
Automate generation of C/C++ API docs (#9997) 2021-12-10 17:45:50 -08:00
Zhang Lei
b000ec91cc
Add quantization tool and its unittest with s8s8 support (#10007)
* Add quantization tool with s8s8 support
  * Add unittest for existing s8s8 support operators
  * Comment ready unittest for upcomming s8s8 operator (ConvInteger, and Resize)
  * Minor change on quantization tools

* Use different s8 min value upon weight or activation.

* use same qmin for reduce ranged s8.
2021-12-10 16:40:01 -08:00
Changming Sun
7a70d22150
Change some const to constexpr in unit tests code(#10002) 2021-12-10 12:26:59 -08:00
Yufeng Li
ffdafb2012
add fallback of s8s8 support on x64 (#9995)
* add fallback of s8s8 support on x64
2021-12-10 11:33:19 -08:00
Yi-Hong Lyu
3c79f3055f
Weaken x86.get_pc_thunk for NDK <= r22 (#9994)
Otherwise there is multiple definition of '__x86.get_pc_thunk.bx'
2021-12-10 01:30:26 -08:00
Ryan Hill
343a76945b
Fix some documentation errors plus ones generating doxygen warnings (#9993) 2021-12-09 17:42:34 -08:00
Chi Lo
4669048b47
Handle compiler warnings for TRT EP (#9956)
* fix error C4996

* remove wd4996 and fix error C4966

* fix typo

* remove wd4996 for onnx-tensorrt

* remove more /wd for onnx-tensorrt

* gix bug for strncpy_s of (Buffer is too small && 0)

* fix code to remove warning 4244

* fix code to remove warning 4267

* remove /wd4267 /wd4244

* fix bug

* change int to size_t

* using size_t instead of int

* use float instead of double

* Use size_t instead of int

* use size_t instead of int

* use size_t instead of int. Also fix typo
2021-12-09 15:33:52 -08:00
Ryan Hill
e0960d7d79
Change assert on a null value to an ort_enforce (#9982) 2021-12-09 14:44:58 -08:00
Yulong Wang
b9909f985e
[js/web] rename build-def.ts to build-def.d.ts (#9954) 2021-12-09 14:17:42 -08:00
Sunghoon
c7e8365e1f
Resolve security issue reported by dependabot (#9983) 2021-12-09 13:45:56 -08:00
Yufeng Li
2fdcaffbb7
add missing test files (#9989) 2021-12-09 13:25:15 -08:00
Edward Chen
41fd745996
Fix build error when using '--build_minimal extended' and '--build_wheel' build.py options. (#9979) 2021-12-09 10:01:35 -08:00
Dmitri Smirnov
a7abd541c7
Correct message type (#9973) 2021-12-09 10:00:44 -08:00
Xavier Dupré
42c176b60c
Update default opset to 14 in ORTModule (#9743)
* update to torch 1.10
* update torchvision version
* update torchtext version
* remove deprecated option enable_onnx_checker
* add unit test to test gradient of GatherElements
* add ORTMODULE_ONNX_OPSET_VERSION in a docker file
2021-12-09 12:45:35 +01:00
Yufeng Li
bc0f2d173a
enable s8s8 QDQ fusion on ARM (#9961)
* enable s8s8 QDQ fusion on ARM devices
2021-12-08 18:13:13 -08:00
Martin Hořeňovský
cd552e1bda Add build.py option for disabling memleak checker
The memleak checker used by default in Debug configuration does not
play nice with embedding static lib of ONNXRuntime into binaries,
because other code will not be using the same debug heap, leading
to trouble.

This makes it easier for outside builders to disable it for their
build.
2021-12-09 01:39:09 +00:00
Nick Kreeger
051d005926
Fix build warnings with VS 2022 (#9967) 2021-12-08 16:43:46 -06:00
Yufeng Li
0c72f1cd5a
add copyright (#9943) (#9970) 2021-12-08 14:34:53 -08:00
Sunghoon
35cf8b8725
[js/react_native] npm audit fix (#9876)
* add p50 in test

* Audit fix for react native

Co-authored-by: Yulong Wang <yulongw@microsoft.com>
2021-12-08 13:27:31 -08:00
Tang, Cheng
0adeb86bfd
Fix ortmodule for the pytorch model with ort device (#9927)
* add ortmodule and eager mode test

* add ortmodule dependency

* convert between aten ort tensor and ortvalue

* register the EP to ortmodule using ort device information

* remove duplicated test

* remove useless dependency

* handle half precision type for ortmodule outputs

* adjust the tensor conversion python code

Co-authored-by: Cheng Tang <chenta@microsoft.com@orttrainingdev9.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net>
2021-12-08 13:04:29 -08:00
Patrik Vavercak
fb30e9fdae
Remove /safeseh link option from non-msvc builds (#9744) (#9935) 2021-12-08 11:44:00 -08:00
Ye Wang
9e7d52a801
Update parity_check_helper.py (#9884) 2021-12-08 10:51:46 -08:00
Yi-Hong Lyu
f60a287a64
Add __x86.get_pc_thunk.bx to avoid dependency (#9955) 2021-12-08 04:50:41 -08:00
Dmitri Smirnov
a7f649db7c
Enable proper override using MIMalloc (#9944)
Redirect memory allocations to MiMalloc and advance its version to v2.0.3
Refactor for a universal ifdef
2021-12-07 17:56:58 -08:00
Guoyu Wang
b34b991aea
Improve reduced ops and types build (#9908)
* Improve reduceops and types build

* minor update

* fix test error

* fix minimal build break

* minor update and add comments

* Address CR comments
2021-12-07 13:02:05 -08:00
Weixing Zhang
840212e115
Enable OneHot kernel for ROCm EP and add Dockerfile for ROCm 4.3.1 (#9656)
* enable OneHot for ROCm EP

* add dockerfile for ROCm 4.3.1

Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
2021-12-07 12:47:00 -08:00
Justin Stoecker
63c8889944
Restore arm64x onnxruntime binaries (#9950) 2021-12-07 12:39:46 -08:00
sfatimar
5e4d58a50a
Openvino ep nuget (#9909)
* Changes

*Fixed merge conflicts

Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>

* C# Nuget fix for windows

-> OpenVINO Libs included in Nuget package
-> Updated nuget.exe path for openvino ep build in Windows
-> Include mvcmd file along with openvino dlls

* Fixing PEP Style comments

* Comment Removed

Co-authored-by: MaajidKhan <n.maajidkhan@gmail.com>
Co-authored-by: saharfraza <sfatima.3001@gmail.com>
2021-12-07 07:48:31 -08:00
Scott McKay
a23cd5b697
Update Xamarin sample code (#9925)
* Update InferenceSample so the mobile app is more user friendly.

Remove fasterrcnn xamarin sample. Adding a more complete xamarin sample targeted at end users to the inference examples repo.

See https://github.com/microsoft/onnxruntime-inference-examples/pull/58
2021-12-07 16:18:58 +10:00
MengX1991
58728f95a2
Fix conv quant reduce range option (#9922)
Co-authored-by: menj <menj@microsoft.com>
2021-12-06 16:43:54 -08:00
Yufeng Li
5871ca1cd1
Comment out unused parameter (#9914) 2021-12-06 15:39:58 -08:00
Weixing Zhang
67a30ef716
Address some code scan issues (#9873)
Potential comparison of a constant with another constant.
at D:\a\_work\1\s\orttraining\orttraining\training_ops\cuda\reduction\\reduction_all.cu@97,42

Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
2021-12-06 13:50:52 -08:00
Yufeng Li
e613019174
add s8s8 support for quantized conv and gemm (#9902)
* add s8s8 support for quantized conv and gemm
2021-12-03 14:55:18 -08:00
Ye Wang
d8c71304c1
Update Dev_Guide.md (#9921) 2021-12-03 10:30:16 -08:00
Chi Lo
02aa16e3ea
QDQ tool modification part3 (#9904)
* refine per channel quantization for qdq

* remove old option

* add comment

* add import itertools
2021-12-03 10:09:34 -08:00
Dwayne Robinson
4ff78aae45
Merge pull request #9917 from microsoft/user/dwayner/FnsCandyTolerance30696168
Update WinML model tests for FNS candy and Inception float16
2021-12-02 22:45:45 -08:00
Sheil Kumar
5edaa75ef6
Fix LoadFromStream to not use wss::Buffer internally (#9918)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-12-02 21:29:06 -08:00
Tang, Cheng
8db49e3d0f
add ortmodule and eager mode test (#9888)
* add ortmodule and eager mode test

* add ortmodule dependency

* fix eager pipeline

* skip tthe ortmodule test for windows due to win ci issue

* remove useless win ci change

* add torch

Co-authored-by: Abhishek Jindal <abjindal@microsoft.com>
2021-12-02 19:49:18 -08:00
Dwayne Robinson
6e4c534ce2 Relax tolerance slightly more for Intel after autopilot run 2021-12-02 19:42:31 -08:00
George Nash
1c38ceda49
Add fusion support for Dnnl execution provider (#9897)
* Op fusion support added

In addition the following op fusions are detected
 - ConvRelu
 - MatMulAdd

This change includes
  - Change abstraction of Subgraph + node + tensor to support delete insert
    modify
  - add nodearg class to establish connection from tensor to node
  - add graphtransformer class to support fusion
  - add topological sort to ensure propoer node ordering after fusion
  - add convrelu + matmuladd primitive to support execution of fused nodes
  - Fix FusionResolution with missing tensors

    when fusing, if the target node contains fewer tensors then original
    patterns (Gelu and FastGelu ignores many initializers), potentially delete them
    also from inputs and initializers

    Also check tensor has no producer and consumer before deleting

Signed-off-by: Wang <zhaoyang.wang@intel.com>

* Gelu and FastGelu Fusion for DNNL EP

The basics of the Gelu/FastGelu code is modeled after:
   - core/optimizer/fast_gelu_fusion.cc and
   - core/optimizer/gelu_fusion.cc

OneDNN does not have support for 'Erf' unless it is part of 'Gelu'.

This results in detecting 'Gelu' fusion twice. Once when detecting
if the 'Erf' Operator is supported and again in the subgraph transformer
code. The capability code is finding the Gelu using onnxruntime:GraphViewer
and onnxruntime::Node.  While the transformer code is using DnnlSubgraph
and DnnlNode.  This results in two parts of code looking for the same
pattern but unfortanatly having little code reuse.

This also adds support for Biased versions of Gelu and FastGelu if they already
exist in a model.

Signed-off-by: George Nash <george.nash@intel.com>

* Code Clean Up

Signed-off-by: Wang <zhaoyang.wang@intel.com>

Co-authored-by: Wang <zhaoyang.wang@intel.com>
2021-12-02 18:11:19 -08:00
Abhishek Jindal
06e63218be
changing commit for windows build for eager mode (#9912) 2021-12-02 14:07:46 -08:00
Dwayne Robinson
77e67a6de7 Add one more example line 2021-12-02 13:34:01 -08:00
Dwayne Robinson
ef7671b938 Comment out old lines 2021-12-02 13:30:34 -08:00