Commit graph

350 commits

Author SHA1 Message Date
Changming Sun
87b1fddd97
Add Linux/MacOS ARM64 support to nuget packaging pipeline (#9570) 2021-10-27 19:00:43 -07:00
Scott McKay
b5a652c578
Add Xamarin support (#9436)
Add Xamarin support to the ORT nuget packages.
  - Update C# code to support Xamarin builds for iOS and Android
  - refactor some things to split out common code
  - include iOS and Android ORT native shared library in native nuget package
2021-10-27 20:07:07 +10:00
Suffian Khan
47888392ab
Fix nightly CI pipeline to generate ROCm 4.2 wheels and add ROCm 4.3.1 wheels (#9101)
* make work for both rocm 4.2 and rocm 4.3.1

* fix rocm 4.3.1 docker image reference

* fix CUDA_VERSION to ROCM_VERSION

* fix ReduceConsts conflict def

* add ifdef to miopen_common.h as well

* trailing ws
2021-09-19 23:36:03 -07:00
Guoyu Wang
438175cb34
Build shared host protoc in iOS CI pipelines (#9087)
* iOS build, share host protoc build

* Change android ci

* ios packaging ci

* checkout submodule

* revert

* update package pipeline

* minor update
2021-09-16 17:16:50 -07:00
Maajid khan
7fc28cd539
[OpenVINO-EP] UEP v3.1 Release with OpenVINO 2021.4.1 (#9081)
* 2021.4.1 Docker and ci changes

* OV version change

* Removing Imagescaler op from the op's list

Reverting this change which was added in last
PR. Imagescaler is now deprecated. so removing
it from the supported list. Also this
op is causing regression in the performance
of the FP16 models.

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

* Re-writing the help message for num_of_threads

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

Co-authored-by: Aravind Gunda <aravindx.gunda@intel.com>
2021-09-16 17:09:07 -07:00
Suffian Khan
4322f7e647
Fix ROCm wheels CI pipeline break by installing latest protobuf from source (#9047)
* install protobuf from source

* fix rm command in Dockerfile

* fix options on rm command

* fix cd into protobuf source directory

* try again

* remove strip step

* debug list the files

* ls on /usr

* more debug

* more debug

* adjust LD_LIBRARY_PATH

* try remove protobuf before ORT build
2021-09-14 12:07:00 -07:00
baijumeswani
1422a9ba6b
Remove previous temporary fixes and address TODOs (#9020) 2021-09-13 10:10:07 -07:00
Ashwini Khade
ec63d10303
add model local function support (#8540)
* updates for picking pnnx commit

* add tests filter to c# tests

* plus test fixes

* fix versioning for contrib ops

* fix tests

* test filter for optional ops

* more versioning related updates

* fix test

* fix layernorm spec

* more updates

* update docs

* add more test filters

* more filters

* update binary size threshold

* update docs

* draft - enable model local function

* enable model local functions in ORT

* update to latest rel onnx commit

* plus tests

* plus more updates

* plus updates

* test updates

* Fix for nested functions + shape inference

* plus bug fix and updates per review

* plus fixes per review

* plus test updates

* plus updates per review

* plus fixes

* fix a test
2021-09-08 11:47:01 -07:00
Olivia Jain
a0c9408f0d
Make TRT Version Configurable (#8864)
* copy changes from trt_and_mem

* second edits

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml for Azure Pipelines

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml for Azure Pipelines

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml for Azure Pipelines

* change to cuda 11.4

* build with cuda 11.4

* Update Dockerfile.ubuntu_cuda11_1_tensorrt7_2

* add cmake extra defines

* cmake architectures

* fix cmake arch

* Delete ubuntu-18.04.Dockerfile

* Rename Dockerfile.ubuntu_cuda11_1_tensorrt7_2 to Dockerfile.ubuntu_cuda11_4_tensorrt7_2

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml for Azure Pipelines

* removing previous ort args

* rename to cuda 11.4

* remove cuda 10_2

* delete trt 7.1

* remove 7.1

* Passing in cuda architecture to reduce build time

* always add submodule sync due to recursive cloning

* fix run command

* add and

* take away unused arms and share python installation script

* Update linux-gpu-tensorrt-ci-perf-pipeline.yml

* Update Dockerfile.tensorrt

* cleanup file

* install python directly on dockerfile - move to scripts in future

* Update Dockerfile.custom-trt-perf

* adding cuda 11.1 for missing Libnvrtc.so.11.1

* Delete install_python.sh
2021-09-03 13:32:27 -07:00
liqun Fu
a7f5bd226b
retarget torch181 to torch182 (#8947)
Co-authored-by: liqun <liqun@OrtTrainingDev4.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2021-09-03 09:44:42 -07:00
Hariharan Seshadri
acd9db7fad
Fix location planning for initializers used only in nested subgraphs (#8642) 2021-09-01 00:02:08 -07:00
Changming Sun
129722db37
Add android binary size monitor back (#8904) 2021-08-31 14:13:55 -07:00
Abhishek Jindal
868c8af9ac
Abjindal/eager mode pipeline (#8870)
* Adding pipeline file for eager mode

* adding the build eager mode flag

* adding torch wheel files for installation

* Changing pytorch version for change in wheel files

* updating requirements file path

* Removing Java and NodeJS from the build

* removing import torch for testing build of eager mode

* changing the build command

* import torch

* building eager mode separately

* removing Java tests

* python path issues

* changing python path location

* changing the build path file loc

* installing torch before build

* setting environment for building eager mode

* Copying the build file and getting rid of flags

* changing python path

* adding missing packages

* moving build eager mode code

* changing python path to python3

* adding amd_hipify

* adding logger file

* install torch before build

* change requirements file location

* install torch before build eager

* modifying eager mode build

* modifying build location

* adding new docker image

* handling gradle move issue

* Typo fix

* changing deps file

* adding java and nodejs

* changing repo name for docker image

* removing pybind

* building only eager mode

* changing the image name

* removing install wheel package

* build complete onnxruntime with eager mode

* building wheel

* enabling pybind

* adding build eager mode flag in unit tests

* removing build java nodejs

* adding build command

* removing java tests

* moving Debug tests before Release

* building Debug only case

* changing debug test code

* running the build eager mode with tests

* adding build dir

* adding build dir path

* changing build dir path

* changing build command for eager mode

* building eager mode and running tests simultaneously

* adding more flags to the pipeline

* chaning flag

* adding Debug and Release

* changing torch to nightly build

* changing torch version for nightly build

* chaning torch version

* move to Ubuntu image

* adding pool

* adding dockerfile for eager mode

* adding python deps file for eager

* modifying python deps file for eager

* changing deps file

* changing deps file statements

* changing python path

* REMOVING ECHO line

* going to original docker file

* changing docker file

* changing to eager requirements file

* changing python deps file

* changing paths

* changing cmake path

* changing build script

* changing python installation

* running debug mode only

* changing pipeline file

* test name

* test name

* test name2

* changing requirements file

* final flags for eager mode

* previous pipeline

* moving to ubuntu image and including some deps

* adding cmake path

* returning to manylinux image

* removing unncecessary files for pipeline
2021-08-30 18:24:39 -07:00
Chi Lo
6a477acecf
Add tensorrt_provider_factory.h to artifact (#8869) 2021-08-27 09:09:54 -07:00
Chi Lo
eb8f84e2a2
Fix issue of GPU tarball/zip/java package (#8850)
* modify for test

* modify for test

* modify for test

* modify for test

* modify for test

* modify for test

* prepare for PR

* Rename cuda directory to gpu directory in tarball

* Fix gpu java package

* fix bug

* fix small bug
2021-08-26 10:16:16 -07:00
Changming Sun
ced2d8e597
Clean up TRT docker files (#8847) 2021-08-25 22:26:31 -07:00
Changming Sun
9cd7d836f7
Delete Dockerfile.ubuntu_for_android (#8848) 2021-08-25 22:25:14 -07:00
Chi Lo
32ecbf4691
Create combined GPU tarball and zip file package (#8827)
* Add onnxruntime_providers_shared.dll into gpu nuget package

* Modify for test

* Temporarily remove for test

* Modify for test

* Modify for test

* Test packging Windows combined GPU

* Test packging Windows combined GPU

* Test packging Windows combined GPU

* Test packging Windows combined GPU

* modify for test

* modify for test

* fix bug

* Modify for test

* Modify for test

* Modify for test

* Modify for test

* Modify for test

* Modify for test

* Modify for test

* Modify for test

* Prepare for PR

* Prepare for PR

* Code refactor

* Rename proper Artifact name

* Rename intermediate Artifact names

* Revert Artifact Names

* Rename Artifact Names

* Modify Artifact name

* Modify Artifact name

* Modify Artifact name

* Update Java package

* Update Java package

* fix bug to change artifact name

* Fix bug for the wrong file path

* Fix no fetching correct artifact and test

* temporarily modify for test

* undo the change for test
2021-08-25 13:51:18 -07:00
liqun Fu
2beb873c6b
move training CI agent pools to 1ES hosted (#8775) 2021-08-18 18:36:19 -07:00
pengwa
39059f2539
enable torch interop build (#8493)
* fix build - python.h not found

* disable --build_shared_lib for ortmodule tests

* fix

* fix the build flag

* disable --build_shared_lib for training path (not only for ortmodule)

* fix missing test model files

* disable test CApiTest.test_custom_op_library when ENABLE_TRAINING_TORCH_INTEROP is ON

* enable custom_op_library build

* fix build

* fix

* merge master and fix build failure

* build onnx_test_runner when onnxruntime_ENABLE_TRAINING_TORCH_INTEROP is ON

* resolve comments

* use --enable_training_torch_interop to replace "onnxruntime_ENABLE_TRAINING_TORCH_INTEROP=ON"
2021-08-19 09:16:32 +08:00
Rachel Guo
78759059f1
[CoreML EP]Make coreml ep build on non-macOS platform (#8677)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* clean

* remove unused defs

* correct typo

* remove onnxruntime_coreml_proto

* cr comments

* enablie nnapi/coreml in minimal build

* enable nnapi/coreml in one build

* refine dependencies

* fix nnapi build failure and remove onnxruntime_coreml_proto dependencies in unit tests cmake files

* small fix

* fix

* fix build

* revert

* fix build

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2021-08-18 09:35:32 -07:00
Olivia Jain
60089f7093
Cuda11.4 (#8709)
* initial update from 11.1 to 11.4

* change 11.4.1 to 11.4.0

* adjusting to match nvidia/cuda image tags

* adjusting to match nvidia/cuda image tags centos7

* correction to 11.4.0

* correction to 11.4.0

* update to cuda 11.4

* change training back to 11.1

* change training back to 11.1

* point to correct nvcr.io/nvidia/cuda 11.4.1 image

* change centos8 to centos7

* correct cudnn path

* Update linux-gpu-ci-pipeline.yml for Azure Pipelines

* Update c-api-noopenmp-packaging-pipelines.yml

* need to resolve centos images but remove space and change to 11.4

* Update linux-gpu-ci-pipeline.yml

* add cudnn to docker image

* bump devtoolset to 10

* revert cuda 11.4 change to setup_env_trt

* orttraining back to 11.1

* use nvcr.io

* Fix previous change back to cuda 11.1

* update cudnn path

* use cudnn image (revert if failure)
2021-08-17 16:36:26 -07:00
Changming Sun
ae6fdd3333
Bring code coverage dashboard back (#8394) 2021-08-16 20:54:39 -07:00
Dmitri Smirnov
8713d76dd1
Introduce C and C++ APIs for Sparse Tensors (#8621)
Add IsSparseTensor
  Add CreateSparseTensor
 Add utilities and test fully sparse instantiation
 Fully sparse blocksparse
 Add test and docs for fully sparse tensor instantiation
 Rework creation API
 Use API
 Non string API
 Retrofit of existing String API
 Add tests
 Add documentation
 Address build issues (Winml pending)
 Add inference test
 Bump binary size
 Add ifdef DISABLE CONTRIB
2021-08-16 16:33:47 -07:00
Changming Sun
f04a235c77
Update manylinux build scripts (#8724)
Update manylinux build scripts. Sync it with the latest upstream.
2021-08-13 12:04:00 -07:00
liqun Fu
bec24ca4c1
create packaging pipeline to support cuda11.4 (#8663) 2021-08-11 17:44:57 -07:00
Edward Chen
20f006c580
Remove flake8 check from CMake build. (#8662) 2021-08-09 14:10:36 -07:00
Suffian Khan
6dd59a1117
revert onnx version (#8643) 2021-08-09 05:53:40 -07:00
Ashwini Khade
96eb9810ba
Update onnx (#8458)
* updates for picking pnnx commit

* add tests filter to c# tests

* plus test fixes

* fix versioning for contrib ops

* fix tests

* test filter for optional ops

* more versioning related updates

* fix test

* fix layernorm spec

* more updates

* update docs

* add more test filters

* more filters

* update binary size threshold

* update docs

* plus more fixes

* updates per review

* update to release commit

* add filters for optional type tests

* plus updates
2021-08-05 09:21:44 -07:00
stevenlix
ee99fb400c
Upgrade TensorRT to v8.0.1 (#8512)
* update onnx-tensorrt parser to master

* disable unsupported tests

* add cuda sm 75 for T4

* update tensorrt pipeline

* update trt pipelines

* update trt pipelines

* Update linux-gpu-tensorrt-ci-pipeline.yml

* update trt cid pipeline

* Update linux-gpu-tensorrt-ci-pipeline.yml

* Update Tensorrt Windows build pool and TensorRT/CUDA/CuDNN version

* update to cuda11.4 in trt ci pipeline

* update base image to cuda11.4

* update packaging pipeline to cuda11.4

* clean up

* remove cuda11.1 and cuda11.3 docker file

* disable unsupported tensorrt tests at runtime

* Update linux-multi-gpu-tensorrt-ci-pipeline.yml
2021-08-02 11:20:31 -07:00
Changming Sun
0510688411
Update compliance tasks in python packaging pipeline and fix some compile warnings (#8471)
1. Update SDLNativeRules from v2 to v3. The new one allows us setting excluded paths.
2. Update TSAUpload from v1 to v2. And add a config file ".gdn/.gdntsa" for it.
3. Fix some parentheses warnings
4. Update cmake to the latest.
5. Remove "--x86" build option from pipeline yaml files. Now we can auto-detect cpu architecture from python. So we don't need to ask user to specify it.
2021-07-30 17:16:37 -07:00
Dmitri Smirnov
950fe5e28b
Implement SparseTensor and infrastructure suppport and advance ONNX commit (#8038)
SparseTensor support
  Implement Builder pattern
  Fix support for 1-D and 2-D COO indices
  Implement and test CSR support.
  Handle shape inference for SparseTensors
  Implement conversion for COO, CSR and tests.
  Address the case where constant sparse initializer is the output.
  Implement test infra for SparseTensors
  Implement SparseDenseMatMul for Csr and COO and tested it.
  Add hash for SparseToDenseMatMul
  Finish shared provider refactor
  Refactor GetOrCreate to Create
  Working on py interface
  Expose OrtDevice and use it in allocate_numpy
	Adjust Sparse interfaces, add support for string SparseTensor. Add tests.
	Add and test to_cuda()
	Add accessors to format specific indices
	Test values and indices views, read-only flag, after GC access
	Add sparse related methods to OrtValue
	Re-work SparseTensor wrapper, add OrtValue methods
	Rework numpy_array_to_cuda/to_cpu
	Add run_with_ort_values
	Add models and test sparse_mat_mul with run_with_ort_values
	Refactor sparse tensor to use a single buffer
        Ifdef x86 Eigen CSR sparse matmul implementation
        Exclude broken test, check for string type when copying cross device
       Split pybind schema, regenerate docs, add exclusion
       Conditionally exclude schema module
       Update docs fix cuda build
       Add test to a filter and renerate JS docs
      Add conversion and test string support for sparse tensors
      Exclude conversion utils from minimal build
      Add CUDA Memcpy and adjust provider interfaces
2021-07-22 15:24:36 -07:00
Thiago Crepaldi
9073c094d4 Update torch litghning and re-enable test 2021-07-22 14:18:07 -07:00
Adam Pocock
55b26b6951
[Java] Adds support for DNNL, OpenVINO, TensorRT shared providers and refactors the CUDA shared provider loader (#8013) 2021-07-20 22:33:15 -07:00
Ryan Hill
cc9f793b48
Move one function from cuda_provider_factory.h (#8407) 2021-07-19 17:55:59 -07:00
Maajid khan
1686e8ff57
[OpenVINO-EP] 2021.4 Release (#8369)
* Changes to ensure the openvino-ep-2021.4 branch is created
* Fix failing cpp and python unit tests
* Fixed Myriad Tests for Ov_2021.4
* Disabled failing python tests for myriad
* Fixes models which were breaking w.r.t 2021.4
* Added fixes to Fix tinyyolov3 working on Myriad
and MaskRcnn, FasterRcnn using GPU_FP32
* Added FP16 output data type support for ngraph
* Implemented ReadNetwork() method

->Using Core::ReadNetwork() method for reading and creating a CNNNework

->Since OpenVINO™ 2020.4 version, Inference Engine enables reading ONNX models
  via the Inference Engine Core API and there is no need to use directly the low-level
  ONNX* Importer API anymore. To read ONNX* models, it's recommended to use the
  Core::ReadNetwork() method that provide a uniform way to read models from ONNX format.

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

* Fixed ngraph f16 supported output type

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

* Added comments in data_ops.cc

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

* Fixed broken windows build

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

* Disable failing CPP tests on CPU

Some of the convtranspose tests are failing on
OpenVINO-EP CPU due to accuracy mismatch w.r.t
default CPU. so currently we are disbaling
these tests.

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

* Updated for ov version 2021.4

* Changes to include qdq ops in code

* Disabled failing python tests on GPU

Disabled two maxpool python tests on
GPU as they were passing but throwing
segfault

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

* Fix the backward compatibility issue

ReadNetwork() API has a bug and will only work
starting from OpenVINO 2021.4 version.

The previous versions will still have to use
onnx importer route

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

* Fix CMakeLists.txt for OpenVINO EP

If a directory with OpenVINO is sourced,
the latest OpenVINO settings have to
be imported.

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

Co-authored-by: sfatimar <sahar.fatima@intel/com>
Co-authored-by: sfatimar <64512376+sfatimar@users.noreply.github.com>
Co-authored-by: Aravind Gunda <aravindx.gunda@intel.com>
2021-07-19 10:40:56 -07:00
Guoyu Wang
c5038063ed
Add iOS/macOS static framework (#8357)
* Add ability to generate ios static framework

* Fix typos

* Add pod cache clean, update some comments of previous commit

* Fix CI failure with newly added cpuinfo library

* Update test model (CoreML requires node has a name)

* Addressed CR comments
2021-07-14 16:39:17 -07:00
Chen Fu
df4cb6f301
Adding pytorch cpuinfo as dependency (#8178)
Pytorch cpuinfo library allows us to query current cpu features, micro-architecture and cache size, etc. These information is needed for targeted performance optimizations.

Unfortunately it does not work under Windows/ARM. We need to develop our own later
2021-07-12 14:21:12 -07:00
Guoyu Wang
10142f9510
Add metadata_props to ORT model (#8340)
* Add metadata_props to ORT model

* Minor update

* Update python binding, and increase the minimal pipeline size threshold

* Fixed a small bug in serializing ir_version

* Remove temp ort.py.fbs and add it to .gitignore
2021-07-09 11:28:27 -07:00
baijumeswani
090bae21ab
Pinning pillow version to 8.2.0 to circumvent regression introduced by 8.3.0 (#8303) 2021-07-06 13:02:39 -07:00
Suffian Khan
008c5f7640
Use single builder image across Python versions for ROCm wheels (#8302)
* first attempt share docker image across python and torch versons

* set dependency between jobs

* fix yaml grammer

* remove python version from first stage

* clean deepspeed directroy

* split into two images according torch version

* fix yaml syntax

* invalidate cache

* remove DS to prevent torch 1.9.0 upgrade
2021-07-06 11:56:00 -07:00
baijumeswani
2bda2a62fd
Pin version of Pillow to 8.2.0 to circumvent noncompatibility with numpy (#8278) 2021-07-02 09:05:49 -07:00
Thiago Crepaldi
83be3759bc
Add post-install command to build PyTorch CPP extensions from within onnxruntime package (#8027)
ORTModule requires two PyTorch CPP extensions that are currently JIT compiled. The runtime compilation can cause issues in some environments without all build requirements or in environments with multiple instances of ORTModule running in parallel

This PR creates a custom command to compile such extensions that must be manually executed before ORTModule is executed for the first time. When users try to use ORTModule before the extensions are compiled, an error with instructions are raised

PyTorch CPP Extensions for ORTModule can be compiled by running:
python -m onnxruntime.training.ortmodule.torch_cpp_extensions.install

Full build environment is needed for this
2021-06-28 18:11:58 -07:00
Changming Sun
25db5706bb
Change "Export PyTorch CustomOp" build pipeline to use Ubuntu 20.04 (#8158)
Change "Export PyTorch CustomOp" build pipeline to use Ubuntu 20.04
2021-06-28 16:13:55 -07:00
liqunfu
9366114028
make pipelines to support torch1.8.1 and torch1.9.0 (#8084) 2021-06-25 14:55:49 -07:00
Negin Raoof
80b7b134bf
Adding optional ops in contrib ops (#7946)
* Added optional const spec
2021-06-24 13:16:31 -07:00
Changming Sun
f000dfddbe
Update run_dockerbuild.sh: set default python version based on OS version (#8136) 2021-06-23 15:50:03 -07:00
Changming Sun
6e2b064aec
Delete some unused code in run_dockerbuild.sh and Enable Nuget CUDA tests (#8089)
1. Remove some unused code and simplify tools/ci_build/github/linux/run_dockerbuild.sh.
2. Enable Nuget CUDA tests. The original design was we could leverage Directory.Build.props and let cmake generate the required properties(USE_CUDA/...) there. However, in nuget packaging pipeline we test the package on a different host that doesn't run cmake command and doesn't have the auto-generated Directory.Build.props file.
2021-06-22 18:43:33 -07:00
Chi Lo
27d1784d44
Add TRT 7.1 Pipeline (#8073)
* Revert for testing TensorRT 7.1

* change to origianl googletest version

* change machine

* remove build arg

* change back machine

* revert back googletest version

* Make it ready to merge to master

* revert onnx-tensorrt to v7.1

* rename yml

* use [[ ]] in bash command

* add sudo

* add chmod

* add correct path

* change another way to revert onnx-tensorrt

* change docker image to manylinux build
2021-06-21 20:57:04 -07:00
baijumeswani
7701c8703e
Add module attribute to ORTModule to support HuggingFace Trainer save_model (#8088) 2021-06-18 13:13:45 -07:00