Commit graph

7072 commits

Author SHA1 Message Date
Ashwini Khade
ceb76429db
Merge pull request #12056 from microsoft/bmeswani/merge-training_dev/on_device_poc
Merge On-Device-Training Offline Tooling and C/C++ APIs
2022-07-21 15:09:48 -07:00
Yufeng Li
7194ec1894
fix bug: output of Concat is quantized twice in qdq format (#12254) 2022-07-21 14:55:47 -07:00
Yufeng Li
a18b080513
clean up calibration model (#12255) 2022-07-21 14:50:28 -07:00
Wil Brady
45c0be8a25
Modify generator for eager to use all inputs for determining promote type. (#12268)
* Sort supported types order so we get a consistently generated order of types.
* Fix promote type to include all the input types and not just the first one.
2022-07-21 17:21:10 -04:00
dependabot[bot]
30ac6e87fa
Bump terser from 5.10.0 to 5.14.2 in /js/web (#12253)
Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:development
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 14:04:08 -07:00
Rachel Guo
eb3b49b6a1
[CoreML EP] Remove batch=1 restriction in depthtospace op support (#12258)
* remove batch restriction in depthtospace op support

* update input rank check

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2022-07-21 12:47:26 -07:00
Jameson Miller
108b860dc1
Add dev container / codespace configuration (#12256)
Dev containers[1] provide a self-contained development environment that
can be tailored for a project. GitHub Codespaces[2] provide a cloud
hosted environment to run these containers in. This makes it easy to
provision a consistent development environment with developer tooling
already installed and configured that provide the following benefits:

1. Developer onboarding is simplified.
    1. Easy to get environment setup and running
    2. Reference environment is available, if developer is having issues
       with local environment
2. Developer tooling is provided and automatically configured.
    1. Python / C++ build tooling
    2. Python / C++ code formatters / linters
3. Easy to provision cloud hosted environment via GitHub Codespace.
4. Easy to create ephemeral development environments to test new changes
     1. Can be used to provision environments to test changes
        and Pull Requests

This can ease several pain points that developers on-boarding to the
project can encounter. One of the problems I have seen with developers
new to the project (I am one of these) is having the baseline
development environment (Python / C++) and recommended tools (e.g. VS
Code Python / C++ extensions, linters, and autoformatters) installed and
configured to efficiently get started in the repository. For all
developers, this makes it easy to leverage ephemeral cloud hosted
development environments via GitHub Codespaces.

**Notes:**

  - Compiling the project can run into trouble if the codespace has < 32
    GB of RAM

1) https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers
2) https://docs.github.com/en/codespaces/overview
2022-07-21 15:29:15 -04:00
Xinya Zhang
03dfcb0e87
[ROCm] Enable int8 for MatMulInteger Op (#11776) 2022-07-21 11:20:48 -07:00
Baiju Meswani
cbf08c7a7b Make GetTrainingApi as a part of the OrtApis, add Training API documentation and address other pull request review comments 2022-07-21 18:11:48 +00:00
Justin Chu
3d2bcb3386
Use unregister_custom_op_symbolic to unregister torch symbolics (#12146)
Description: Use unregister_custom_op_symbolic to unregister torch symbolics

Motivation and Context

Fixes #11305
2022-07-21 10:47:53 -07:00
Rachel Guo
496618594f
Update supported ops md for NNAPI/CoreML EP (#12245)
* update supported ops md

* address pr comments

* address pr comments

* wording
2022-07-21 10:23:08 -07:00
LironKesem
7dc45bc311
Implementing aten::gt.Scalar_out and aten::lt.Scalar_out (#12181)
* Implementing aten::gt.Scalar_out and aten::lt.Scalar_out

* modified the code according to code review
2022-07-21 10:36:43 -04:00
Yi Zhang
007ef42749
Fix: Test coverage is undercounting and profiling errors (#12260)
add data relocation for onnx_test_runner
2022-07-21 16:19:24 +08:00
Ye Wang
5066ef1185
Fix a bug in beam search custom attention mask allocation (#12240) 2022-07-20 23:42:54 -07:00
Yulong Wang
0c78b71352
prepare test folder from GitHub (#12220)
* consume onnx test data from github

* ensure tests

* update script and allow opset specification

* fix python format

* fix python format

* consume new filter format

* fix linting error
2022-07-20 22:01:08 -07:00
Tianlei Wu
568d08994f
fix test_optimizer.py (#12219)
* fix optimizer test
* update message and skip test instead of uncomment
* fix deprecated warning
2022-07-20 19:21:26 -07:00
101arrowz
c72bb8aaa9
[js/web] add OffscreenCanvas support to WebGL backend (#12159)
* Add OffscreenCanvas support to WebGL backend

* fix format

* fix lint
2022-07-20 14:06:03 -07:00
Rachel Guo
471dbfc250
[NNAPI] Add int32_t as supported input data type and other minor gather op updates (#12171)
* update (including commented out code for gather)

* update tests etc.

* update

* minor updates

* fix typo

* fix build

* minor update

* address pr comment

* refine comments

* address pr comment

* update condition check and UTs

* refine code comments

* address lint warning
2022-07-20 12:07:46 -07:00
Tianlei Wu
5651d91c32
Fix onnx version comparison (#12223)
use version.parse to compare version
2022-07-20 11:14:06 -07:00
Jian Chen
43e1e89453
Update aarch64 building pool to aiinfra-linux-ARM64-CPU-2019 (#12243)
* Setting new pool for arm64

* Setting defualt pool name

* adding DockerInstaller stage

* try to install docker from apt-get

* change to specific

* adding chmod to docker.sock

* install dotnet sdk

* specic dotnet 3.1.x

* add manuall step to install dotnet

* typo bass

* remove inputs

* change dotnet installation dir

* skipComponentGovernanceDetection on arm64 linux

* variables typo

* variables:
    - name: skipComponentGovernanceDetection
      value: true

* update variables

* skipComponentGovernanceDetection set to true

* moving varliables

* moving the variables again

* setting condition on cgd

* indentation

* indentation again

* conditional variable

* if

* remove cgd

* conditionl on cgd

* condition

* parameters

* clean up
2022-07-20 12:08:02 -04:00
msftlincoln
424120d0fa
cpplint & Eager mode: refactor and add comments to empty_* functions, general lint cleanup in ort_aten (#12238)
* empty* comments and code reuse

* lint

* more cpplint

* add cpplint settings

* test empty
2022-07-20 11:47:57 -04:00
Vincent Wang
72c689a502
[CUDA] Use dim3.z to Handle Large Input For GatherGrad (#12250)
* use dim3.z to handle large input size

* less blocks
2022-07-20 18:42:52 +08:00
pengwa
ebfd81e67e
Fix BiasGeluGrad bug (#12200)
* use 3D grid to avoid the upper limit of grid dimension

* enrich tests

* Revert "use 3D grid to avoid the upper limit of grid dimension"

This reverts commit 2d5badf2fe8cd985f3f29ee2cb18fff13d07c2ab.

* change to a fix: switch the 1st and 2nd dim
2022-07-20 17:59:29 +08:00
Vincent Wang
3cdc6d7775
[ORTModule] Bugfix of torch.chunk's Custom Symbolic when chunks==1 (#12249)
handle custom chunk with chunks==1
2022-07-20 17:00:41 +08:00
cloudhan
a0074ba9bc
Add baseline gemm for kernel explorer (#12050)
Use rocblasGemmHelper gemm wrapper from ORT and profile for bert param size only.
2022-07-20 13:49:26 +08:00
mindest
add631410a
[ROCm] Re-enable ReduceL1, L2 and related tests (#12209)
Re-enable ReduceL1,L2 and related tests
2022-07-20 13:13:02 +08:00
Juan Paez
9b6ef17c5f
Eager opgen support for in-place operations with variadic args (#12125)
* use torch library binding frontend for tensorlist

* fix test

* allow in-place modification of variadic args

* fix lint issues

* update ORT eager readme

Co-authored-by: Juan Paez <juanpaez@microsoft.com>
2022-07-19 21:01:00 -07:00
Xinya Zhang
5e2109f7ef
[ROCm] Enable GridSample Op. (#11969) 2022-07-19 20:44:30 -07:00
Dmitri Smirnov
4f106d2b3b
Eliminate unnecessary status lock acquisition in TP (#12196)
Eliminate unnecessary status lock acquisition in the Thread Pool
2022-07-19 14:16:12 -07:00
Tianlei Wu
972e5e7300
Improve symbolic shape inference in transformers tools (#12217)
improve symbolic shape inference handling n transformers tools:  avoid infinite loop and suppress duplicated warnings
2022-07-19 13:27:35 -07:00
Jameson Miller
975bb56e8c
Eager mode - argmax_out: set output tensor (#12233)
This change updates the implementation or te argmax_out operator to 1)
set the output tensor correctly and 2) remove the unnecessary use of a
temporary tensor to store intermediate result of onnx ArgMax operation.

Previously, the argmax_out operator did not correctly update the out
tensor - it replaced the OrtValue instead of the memory backing the
OrtValue . To properly update the output tensor, we need to calculate
the expected shape of the out tensor.

We add the helper function calculate_reduction_shape to calculate the
shape of the reduced tensor from the input tensor, dimension to reduce,
and option to keep the reduced dimension or not. This is based on the
utility functions in aten/src/ATen/native/ReduceOpsUtils.h in the
PyTorch repository, but is tailored to be a bit more specific to our
current needs.

Notes:

We considered just directly leveraging PyTorch's utility functions (e.g.
get_reduction_shape) to calculate the shape of the reduced tensor from
aten/src/ATen/native/ReduceOpsUtils.h in the PyTorch repository, but
including this header file resulted in warnings around unused functions
that we need to handle. As we only need a limited functionality at the
moment, we instead implemented our own utility function to calculate the
reduction shape for our specific current needs. If we need a utility
function to more generally calculate the reduction shape, we could
consider switching to leveraging the utility methods in PyTorch.
2022-07-19 14:37:03 -04:00
Dmitri Smirnov
555e88982f
Fix GH issue 12208 (#12224) 2022-07-19 10:03:43 -07:00
Changming Sun
2cb642927b
Simplify get_docker_image.py (#12166)
Simplify get_docker_image.py by leverage docker itself remote cache functionality.
2022-07-19 09:53:01 -07:00
Tianlei Wu
0c319d6e94
Exclude implicit inputs from dump of encoder feeds in beam search (#12222)
fix encoder feeds dump
2022-07-19 09:44:12 -07:00
Alexey Gladyshev
66978c7ef5
[TVM EP][CI] Added TVMso EP testing into CI (#12188)
* refactor test for model with undefined shapes

* add test for TVMso EP

* update build script for TVM EP tests

* fix pylint

* disable test for Windows

* fix black

* fix python format

* fix pylint

* fix python format

* replace Path.resolve with os.path.join

* fix python path issue

Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
2022-07-19 16:05:28 +02:00
Wil Brady
4235ebc161
Add eager mode support for mm.out (matrix multiplication). (#12214)
* Add eager mode support for mm.out (matrix multiplication).

* Fallback to cpu when mm requirements not met so cpu can print error message.
2022-07-19 07:28:48 -04:00
Michael Melesse
bb5bd08545
[ROCM] Navi21 fixes pr (#11368)
* add scripts

* update docker scripts

* update build script

* create run script

* add test script

* add log 3 flags

* use the right build function

* build navi

* add clean script

* add pytorch like soln

* only build gfx 1030

* use HOST side var

* ignore logs

* update scripts

* GPU_WARP_SIZE_HOST

* update scripts

* remove scripts/amd

* match main

* add GPU_WARP_SIZE_HOST on cuda side

* match main

* correct gfx1030

* remove print

* move gfx add to rocm5.0

* remove inline

* make constexpr on cuda side
2022-07-18 22:26:57 -07:00
Vincent Wang
173bcdbc71
[CUDA] Split/Concat Kernel Optimization (#12175)
* split concat optimization

* bugfix

* fix ut

* deprecate LooseVersion
2022-07-19 08:10:46 +08:00
Yulong Wang
ced7c2deac
[js/web] use windowed Chrome for perf mode (#12157) 2022-07-18 14:04:27 -07:00
Tianlei Wu
b81b652608
Add --disable_shape_inference option to optimizer.py (#12215) 2022-07-18 13:52:02 -07:00
Sean Murray
93229949d4
Fix bug where onnxruntime_USE_NCCL flag would default to ON (#12195)
Fix bug where onnxruntime_USE_NCCL flag would default to ON, causing ORT to not build properly. New functionality: flag is ON when training is enabled and NCCL is not disabled. Flag is OFF otherwise
2022-07-18 12:13:08 -07:00
Tianlei Wu
17b84c78f7
remove identity in transformers model graph fusion (#12194)
* remove identity in fusion
2022-07-18 09:59:42 -07:00
caoting-dotcom
4d38b84e26
Add file mapping for windows platform. (#12183)
* Add file mapping for windows platform.

* Add unit test for file mapping for windows. Also add an error message for mis-aligned offset

* Add unit test for file mapping for windows. Also add an error message for mis-aligned offset

* Update data type to avoid warnings

* Compitable data type to avoid warnings. Update CreatFileMapping2 condition for winml compiling.

* Add type conversion to avoid warnings for X86 release build.

Co-authored-by: Ting Cao <ticao@microsoft.com>
2022-07-18 09:24:12 -07:00
leqiao-1
09af4a7fdd
remove wrong placed libs (#12201) 2022-07-18 09:22:22 -07:00
Alexey Gladyshev
d31db1aa57
[TVM EP][CI] Integrate TVM EP into ORT public CI on Windows (#12161)
* Integrate TVM EP into ORT public CI on Windows

* empty commit for restart pylint

* empty commit for restart pylint
2022-07-18 11:12:16 +02:00
msftlincoln
52095fb042
Fix line spacing/break issue, extend existing tests (#12191)
* fix line length

* extend test cases

* lint
2022-07-15 19:32:34 -04:00
msftlincoln
a2dc6d32fc
OnnxRuntime Eager: Implement log_softmax with ONNX Ops (#12190)
* share CHECK_STATUS

* log_softmax
2022-07-15 15:03:08 -04:00
msftlincoln
9bca8405aa
bitwise_and ONNX support (#12189)
* bitwise_and ONNX support

* whitespace lint
2022-07-15 12:59:56 -04:00
Wil Brady
89bf6c9b5d
Simple eager training models (#12180)
* Simple NN using ort, and added or modified ort op support.
2022-07-15 09:18:00 -04:00
msftlincoln
fafb24142f
add comment to explain local scalar dense (#12179)
* add comment to explain local scalar dense

* spacing
2022-07-15 09:03:43 -04:00