Commit graph

5233 commits

Author SHA1 Message Date
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
raviskolli
f641c0f4e8 Update requirements.txt
Updated requests version to address component governance failure
2021-07-22 14:18:21 -07:00
Thiago Crepaldi
9073c094d4 Update torch litghning and re-enable test 2021-07-22 14:18:07 -07:00
Ye Wang
e8ee31bcc3
Update onnx_model_bert_tf.py (#8457)
Fix a bug: when layernorm and skiplayernorm are not fused, the program will crash
2021-07-22 13:50:55 -07:00
Adam Pocock
9a6fa057c8
[Java] Allow extraction of multidimensional String tensors (#8452)
Fixing a bug where String tensors would always be single dimensional in Java.
2021-07-22 13:19:49 -07:00
Edward Chen
287a2a778f
Update CODEOWNERS with mobile team ownership of expected kernel def hash data files. (#8454) 2021-07-22 11:19:06 -07:00
Hariharan Seshadri
3360024a0b
Support plugging in custom user-defined allocators for sharing between sessions (#8059) 2021-07-22 10:17:35 -07:00
Edward Chen
989491c333
[NNAPI EP] Make partitioning stop ops configurable. (#8444)
Enable NNAPI EP partitioning stop ops to be overridden by a session configuration option.
2021-07-22 09:21:42 -07:00
pengwa
892ac9f55a
code structure update (rename only) (#8410) 2021-07-22 23:50:19 +08:00
DeyuHuang
4275055868
Add Gridsampler contrib op (#8372)
* add Gridsampler contrib op

* fix gridsampler_paddingmode_border test

* disable the tests until the kernel added

* fix CI failure

* change GridSampler to GridSample
2021-07-22 15:39:28 +08:00
Ryan Hill
53d5814d12
Move the wrapped types out of provider_interfaces (#8455) 2021-07-21 21:43:40 -07:00
Faith Xu
14b045ad52
Add link to sample repos (#8417)
* Update readme and add link to sample repos

* Minor updates based on PR feedback

* Add links to sample repos in former samples folder
2021-07-21 16:18:59 -07:00
Edward Chen
695536a7ac
Make some common macros safer to use. (#8445) 2021-07-21 12:14:36 -07:00
Oliver Rausch
972aee8308
Fix GCC build error in quantization tests (#8449) 2021-07-21 18:15:13 +02:00
Ryan Hill
7e2ecb2eeb
Remove unnecessary line as no headers exist now (#8446) 2021-07-21 01:03:05 -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
Changming Sun
1cd9b47d8d
Remove all C/C++ samples from our C# dir (#8441) 2021-07-20 21:46:46 -07:00
Rajalakshmi Srinivasaraghavan
894fc82858 POWER10: Additional check in cmake
When compiling with newer gcc and older glibc, there is a chance
for new POWER10 macros to be not available in hwcap.h. This patch
checks whether hwcap macros are available before using that in
platform.cpp.
2021-07-20 13:04:18 -07:00
Sherlock
28527b4867
Handle duplicated names for output_grads (#8431) 2021-07-20 10:17:31 -07:00
Ryan Hill
cc9f793b48
Move one function from cuda_provider_factory.h (#8407) 2021-07-19 17:55:59 -07:00
Guoyu Wang
3e7fcd8c92
Fix iOS packaging pipeline failure (#8433) 2021-07-19 17:42:58 -07:00
Rachel Guo
bf54fe481e
[CoreML EP] Support 1D Conv for coreml ep (#8398)
* initial conv 1d

* wip

* clean up and add comments

* refine

* elimnate some of the redundant copies of code

* update UT tests

* update with the new creatennlayer

* minor refine

* address cr comments

* refine

* refine

* address comments

* address comments

* fix

* fix

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2021-07-19 17:26:22 -07:00
Tianlei Wu
862bc8c7a0
shape infer for present output of Attention op (#8430) 2021-07-19 17:24:10 -07:00
harshithapv
0f989c6162
bumping onnxruntime version to 1.8.1 (#8429) 2021-07-19 16:48:56 -07:00
Ryan Hill
e04e1d5ce0
Move shared providers CPU providers into separate file (#8293) 2021-07-19 15:19:32 -07:00
Tianlei Wu
dfe42e185c
update bert notebook to use onnxruntime 1.8.1 (#8379) 2021-07-19 14:16:59 -07:00
Viswanath Boga
afce0e2543
Attention kernel update to handle different Q,K,V hidden sizes (#8039)
* changes working to convert akv nodes

* changes to replace nodes

* changes to accomodate qkv hidden sizes as attributes

* kernel to accept qkv_hidden_size attributes

* Working till compute for varied dimension, todo applyattention()

* changes to make all regression tests work

* inference running successfully without prepack

* success inference with pre-pack weights

* add test for diff sizes

* bias shape need not be a mul of 3

* get the output_hidden_size from input

* infer output shape from input

* merge with master

* cleaning up files that got merged wrong

* accurancy at accepted level

* added unit test case for different dimensions

* all unit tests passing

* packed weights working for attention

* prepacked weights working

* added test case for newly added extra qk input

* updated unit test to test only extra add qk

* fixing build error

* removing few debugs

* reverting test changes

* all python test passing

* cleaning up

* new unit test added, major clean up of code

* removed extra code

* minor

* minor fix to tests

* prepack weights code cleaned up

* compacted compute() in attention.cc

* reformat compute()

* making a parameter T

* adding 3 q,k,v buffers in all cases

* fixing build

* running tests only on cpu

* Updating docs

* trigger ci builds

* Addressing comments in PR

* addressing some more comments

* get add_qk_str from add_qk node directly

* updating docs, added extra check to verify attn inputs

* Optimized the extra add by parallelizing

* added attention_shape to symbolic_shape_infer.py

* minor refactoring to address comments
2021-07-19 12:21:33 -07:00
Sheil Kumar
c3129306e5
Enable string attributes for experimental model building (#8428)
* string attributes

* Update error message

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-07-19 11:48:41 -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
Dwayne Robinson
8544c222ce
Fix build error about if being constant in Eigen and Protobuf (#8291)
* Fix build error about if being constant in Eigen and Protobuf
* Update with Changming's proposal
2021-07-18 00:35:24 -07:00
Edward Chen
4a614637a7
[NNAPI EP] Update NnapiExecutionProvider::GetCapability() to use partitioning utils (#8387) 2021-07-16 17:42:10 -07:00
Hariharan Seshadri
2f408f757e
Improve performance of Pad CUDA kernel (#8408) 2021-07-16 09:44:16 -07:00
sumitsays
127b1f0d01
SDL Native Warning errors in DML ep (#8396)
* Updated d3dx12.h with latest change. Fixed SDL native warning errors

* Removed usage of IID_ID3D12Device variable, instead used __uuidof as in previous commit

* Removed usage of NULL, used nullptr instead.

Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-07-15 23:17:47 -07:00
Guoyu Wang
bcd50afafb
[CoreML EP] Fix failure for layer without name (#8399)
* Fix CoreML failure for layer without name

* Update clip op builder to new naming function
2021-07-15 11:52:01 -07:00
Nick Kreeger
963d883de8
Create a common directory for quantization code and functionality. (#8320) 2021-07-14 22:56:58 -05:00
Edward Chen
ef930b3ca9
[Objective-C API] Fix ORTIsCoreMLExecutionProviderAvailable link error when used from Swift. (#8350) 2021-07-14 18:38:58 -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
Tianlei Wu
41f1280fc9
Fix transformer optimizer (#8392)
* fix a few issues
2021-07-14 16:00:17 -07:00
Edward Chen
88d1ffe9b8
Fix invalid access in log call. (#8389)
Fix bug that shows up when running tests (in particular, GraphTransformationTests.ConcatSliceEliminationTest) with more verbose logging level.

There is a log statement that doesn't get evaluated at the default test logging level (warning). It was accessing the first element of an empty vector. This change moves that log statement before the point where that vector is cleared.
2021-07-14 15:09:45 -07:00
Yulong Wang
0a1c00e8db
[js/node] remove unused dependency node-pre-gyp-github (#8388) 2021-07-14 14:30:44 -07:00
Tianlei Wu
5cd254aa79
update gpt2 attention fusion for past pattern (#8375) 2021-07-14 12:04:53 -07:00
Changming Sun
4e1c5f6ef4
Move the samples to a new repo (#8374)
Move the samples to a new repo https://github.com/microsoft/onnxruntime-inference-examples
2021-07-14 11:16:39 -07:00
Sherlock
4931ef666d
Update ORTModule frontend code owner file (#8335) 2021-07-14 09:26:04 -07:00
Guoyu Wang
68c5eb5414
Fix reduced ops CI failure (#8377) 2021-07-13 20:53:57 -07:00
Tianlei Wu
e340a59993
Update machine info script for transformers notebooks (#8376)
* fix constructor
* update machine_info
* refactor shape_infer_helper
2021-07-13 19:54:27 -07:00
Edward Chen
16f6904232
[iOS] Packaging pipeline improvements. (#8324)
Updates to the iOS packaging pipeline:
- Make it harder to overwrite package archives accidentally when uploading (fails if the archive already exists)
- Only upload package archives for release builds
- Some clean up
2021-07-13 18:48:28 -07:00
Chen Fu
0020703d00
Fix cpuinfo initialization failure in mlas test (#8366)
Fix cpuinfo initialization failure in mlas test


Co-authored-by: Chen Fu <fuchen@microsoft.com>
2021-07-13 18:39:15 -07:00
Ye Wang
04297110c3
Support int64 in ReduceMin cuda op for Opset 14 (#8307)
* reducemin int64_t support

* fix xxcuda.so load error

* testtest

* refactor

* update doc

* propagate types to opset14

* re-generate doc

* rename macro
2021-07-13 16:18:06 -07:00
Jeff Daily
8d8db7c9f0
[ROCm] clear last status if hipErrorNotReady (#8358)
* [ROCm] clear last status if hipErrorNotReady

* use hipEventDisableTiming in rocm_fence.cc

* fix syntax errors

* destroy event before handle becomes invalid
2021-07-13 15:58:40 -07:00
Nick Kreeger
178c139718
cleanup formatting in skip_layer_norm.cc (#8371) 2021-07-13 16:36:41 -05:00