Commit graph

5736 commits

Author SHA1 Message Date
Changming Sun
df7a5342a5
Upgrade com.diffplug.spotless to 5.17.0 (#9546) 2021-10-26 14:29:46 -07:00
Changming Sun
f39821adbc
Fix a bug in CMakeLists.txt when handling NO RTTI (#9547) 2021-10-26 14:29:29 -07:00
Jingqiao Fu
da15f5fc2f
change cmake condition to prevent WCOS fom linking advapi32 (#9500)
* change condition to prevent WCOS fom linking advapi32.dll

* Remove linkage to advapi32.lib
2021-10-26 12:16:49 -07:00
Stella Stamenova
542f1a9737
Cleanup some whitespace and capitalization for set (#9504) 2021-10-26 12:02:07 -07:00
Ginés Hidalgo
a036cc6d4b
Fixing bugs in ORT_NO_EXCEPTIONS (#9479)
ORT_NO_EXCEPTIONS is not working after the latest changes in:

onnxruntime/core/graph/function.cc
onnxruntime/core/graph/graph.cc
2021-10-26 10:50:32 -07:00
Ginés Hidalgo
1aabba7120
Avoided warning C4458: declaration of 'X' hides class member. (#9541) 2021-10-26 10:49:24 -07:00
satyajandhyala
f29057c7c0
Added TanhGrad. (#9507)
* Added TanhGrad.
2021-10-26 09:10:03 -07:00
pengwa
b125446f9c
Optimize python overhead of APEX amp (#9447)
* optimize python overhead of _post_amp_backward

* overwrite apex amp's zero_grad for faster implementation

* move unscale_fp16_grads_into_fp32_grads into C++ impl

* improve the efficiency furthur, reducing 3.5ms to 1.7ms for unilm.

* unilm 1.7ms to 338us: 1). optimize python list <==> std::vector copy, 2). launch the kernels as long as num_elem reach thresh hold. This help reduce the CUDA idel time.

* refine the logic a bit after validating

Co-authored-by: Baiju Meswani <bmeswani@microsoft.com>
2021-10-26 13:13:49 +08:00
Yi-Hong Lyu
27ad20df23
Add QDQ support of Resize to able to fuse it into a quantized Resize (#9476) 2021-10-25 21:48:15 -07:00
ashbhandare
0270ff7951
Minor import fix (#9538) 2021-10-25 21:29:31 -07:00
Changming Sun
f92b8e2ac8
Clean up optional-lite references (#9534) 2021-10-25 21:05:45 -07:00
Yulong Wang
bf4c3fa3d6
[node.js binding] aggregate binaries for multiple platforms in single NPM package (#9501) 2021-10-25 20:16:10 -07:00
Vincent Wang
fb4f7dbbb7
Call ATenOp for ReduceSum on ORTModule (#9471)
* call ATenOp for ReduceSum

* Enable ReduceSum ATenOp for training only

* always load extension
2021-10-26 09:48:57 +08:00
marcusfreisleben
651955d3c9
CUDA: Enable parallel compilation (#8974)
* Pass on parallel option to nvcc

* Fixed build.py

* Added missing string conversion

* Adressed review points
2021-10-25 16:42:58 -07:00
Scott McKay
39d1b9e1c1
Fix bug in Slice helper when dim value is zero (#9492)
* Don't clamp if dim_value is zero as that will set `step` to an invalid value.
2021-10-25 17:39:01 +10:00
Ginés Hidalgo
dbe1b57a71 Update thread_utils.cc 2021-10-22 16:59:09 -07:00
Ginés Hidalgo
a79d375d24 Added fixes for Clang on Win64 2021-10-22 16:59:09 -07:00
Ginés Hidalgo
9335cf102a Deleted duplicated "core/graph/function.h"
"core/graph/function.h" appears twice:
- `include/onnxruntime/core/graph/function.h`
- `onnxruntime/core/graph/function.h` --> This one is redundant and not used anywhere
2021-10-22 16:58:29 -07:00
Stella Stamenova
d608504438
Don't use legacy mode for protobuf (#9498) 2021-10-22 16:50:29 -07:00
Changming Sun
d83adaaf9f
Remove optional-lite (#9424) 2021-10-22 16:45:45 -07:00
Sherlock
3ed8ade675
Use SafeInt for malloc related computation (#9503)
* Use SafeInt for malloc related computation
2021-10-22 16:42:12 -07:00
Wei-Sheng Chin
beddbdec5a
Fix PythonOp exporter (#9318)
Register PythonOp exporter with the right symbol.
2021-10-22 10:45:45 -07:00
stevenlix
5adf175847
pad shape 0 is not allowed in edge mode to comply with latest numpy (#9488) 2021-10-22 10:42:51 -07:00
Wei-Sheng Chin
d2d480a0db
Allow None As Autograd Context (#9315)
* Allow none ctx

* Update orttraining/orttraining/test/python/orttraining_test_ortmodule_autograd.py

Co-authored-by: pengwa <pengwa@microsoft.com>

* Address a comment

Co-authored-by: pengwa <pengwa@microsoft.com>
2021-10-21 20:37:36 -07:00
Guoyu Wang
b64b2d48f3
Move iOS e2e test to XCUITest (#9422)
* Move iOS test to user UITest

* minor update

* Update readme

* update test's ios deployment target

* address cr comments
2021-10-21 18:51:13 -07:00
Ginés Hidalgo
7f2f56633c
Fixed implicit conversion warnings (#9481) 2021-10-21 16:13:28 -07:00
Stella Stamenova
49b66c7486
NFC: Normalize whitespace around if statements in CMakeLists.txt (#9464)
Always add a space after if to make the file consistent
2021-10-21 15:35:58 -07:00
Jeff Daily
ca7116ca3e
CUDA EP's ResizeImpl now uses functors, hipify for ROCm EP (#9466)
Support for device function pointers is not yet available for ROCm.
Instead, the device function pointers were converted to device functors.
Case statements, lambdas, and macros are used for dispatch; as a result,
all combinations of kernels are compiled with inlined functors. The
basis of this approach can be found in PyTorch.

Lastly, hipify and register Resize and Upsample for ROCm EP.
2021-10-21 15:02:41 -07:00
Jeff Daily
66ceb6926d
rehipify ROCm EP files under orttraining (#9443)
* rehipify rocm ep files under orttraining committed to source control

* fix flake8 error
2021-10-21 13:36:21 -07:00
Sherlock
ff23b9ff55
Avoid cudaStreamSync at the end of Forward/Backward (#9470)
* Skip cudaStreamSynchronize at the end of fw 

* skip sync stream for end of backward
2021-10-21 11:28:25 -07:00
Xavier Dupré
5797bd6db3
Remove one unnecessary deepcopy in unflatten_user_output (#9353)
* Removes one unnecessary deepcopy
2021-10-21 10:44:27 +02:00
Sunghoon
4028e51e7e
Update the compatibility of ONNX Runtime Web (#9444) 2021-10-20 18:03:12 -07:00
George Nash
1249c7c29e
Resolve issue when running Yolov4 on DNNL EP (#9355)
The dnnl_binary ops need the memory format to match the format expected by
Onnxruntime. If the memory format of the inputs do not match each other
there will be an error in the calculated results.

Additionally, since the code manually pads the tensor dimensions for broadcasting
the inputs are expected to be in Onnxruntimes format.

Since detecting and reordering the memory to Ort format matches what was previously
done for the Reshape op the code was moved from dnnl_reshape to
dnnl_subgraph_primitive under the name GetMemoryInOrtFormat.

One small additional change made to the capability code log to also print the
percentage of nodes run by the dnnl execution provider.

Signed-off-by: George Nash <george.nash@intel.com>
2021-10-20 13:10:31 -07:00
Stella Stamenova
9fc53df33a
Only add aliasing to targets if the corresponding package was found (#9404) 2021-10-20 11:32:08 -07:00
Nick Kreeger
f1123c2fb3
Fix whitespace and style in concat.cc (#9452) 2021-10-20 12:43:46 -05:00
Jeff Daily
89a22fb641
Add TopK to ROCm EP (#9391)
* Add TopK to ROCm EP

* flake8 fix
2021-10-20 10:39:44 -07:00
Jeff Daily
f8acc6d0e8
Add NonMaxSuppression and RoiAlign to ROCm EP (#9394) 2021-10-20 10:38:45 -07:00
Jeff Daily
c33391329a
Add QuantizeLinear and DequantizeLinear to ROCm EP (#9401) 2021-10-20 10:37:58 -07:00
Changming Sun
406f1629c1
Remove Featurizers code (#9300) 2021-10-20 10:20:35 -07:00
Bowen Bao
e983f37121
Bifurcation detector for aggressive decoding (#9432)
```
Component for aggressive decoding. Find the bifurcation index of predicted tokens, between source tokens,
starting from previous suffix match index, and predicted tokens.
Concat predicted tokens, starting from bifurcation index, to the back
of current tokens. This forms the output tokens.
Detect suffix match index in source tokens, between source tokens and output tokens.
Detection is based on finding the appearances of last n-gram in output tokens
in source tokens.
A match is considered found if source tokens contain a single matching n-gram.
Return the index of the start of the n-gram in source tokens.
No matching if found if src tokens contain multiple or zero matching n-grams. Return -1.
```
2021-10-19 19:53:56 -07:00
baijumeswani
20eaed43e5
Ignore all string inputs to ORTModule AB#1310803 (#9344) 2021-10-19 16:34:47 -07:00
Hariharan Seshadri
4698b73725
Fix output shape description of Attention op's schema (#9406) 2021-10-19 15:56:35 -07:00
George Wu
3873885316
add missing atomic include (#9440) 2021-10-19 14:42:50 -07:00
Jeff Daily
52c53e396d
hipify tensor/gather_nd_impl.cu (#9392) 2021-10-19 14:15:49 -07:00
Jeff Daily
a2ba923ac7
hipify fast_divmod.h (#9400) 2021-10-19 12:34:46 -07:00
Jeff Daily
a8e2e8d76a
hipify tensor/transpose.cc and tensor/transpose.h (#9397) 2021-10-19 12:27:36 -07:00
baijumeswani
757bc66720
Set cuda version to be None instead of an empty string (#9435) 2021-10-19 11:10:52 -04:00
Sherlock
e22920d954
Update ORTTraiing frontend codeowner (#9427) 2021-10-18 23:56:21 -07:00
Yufeng Li
da3dd398c5
Kernels for QLinearConv with symmetrically quantized filter (#9323)
Add kernels for QLinearConv with symmetric quantized filter, e.g., filter type is int8 and zero point of filter is 0. This PR includes kernels for avx2, avxvnni, avx512 and avx 512 vnni. Will adds kernels for ARM64 in following PR.

Kernels uses direct input buffer directly for pointwise, and in-direct buffer for depthwise and non-group conv.

The advantages of those new kernels are:

no need to compute the sum of each pixel output image, and sum/offset of filter can be combined with bias.
with in-direct buffer, im2col returns an array of buffer pointers instead of memcpy'ing the original data. This saves memcpy time and reduces the size of the intermediate buffer needed to hold the im2col transform. In the future, will compute im2col ahead of time for input with fixed input size.
2021-10-18 19:40:18 -07:00
baijumeswani
5da4e07daa
Make FusedAdam mathematically equivalent to Transformers AdamW (#9343) 2021-10-18 16:03:18 -07:00