Commit graph

194 commits

Author SHA1 Message Date
Scott McKay
c5de493a8a
Exclude EPs that aren't available on mobile to try and fix Xamarin build error on M1. (#11267) 2022-04-21 07:01:46 +10:00
Yi Zhang
f1b6f0becd
Update nuget icon (#10672)
Update nuget icon from url to local file because the old tag is deprecated.
2022-03-01 09:11:03 -08:00
Scott McKay
f2ca43fe0d
Enable CoreML in the macos package (#10675)
* packaging pipeline change

* Enable CoreML on macos

Co-authored-by: Guoyu Wang <wanggy@outlook.com>
2022-02-28 09:12:37 +10:00
Lingfeng Wu
3be3db5180
Use IntPtr instead of int conversion for pointer in Memory.Pin() (#10485)
* Use IntPtr instead of int conversion for pointer in Memory.Pin()
Co-authored-by: Lingfeng Wu <lingfw@microsoft.com>
2022-02-16 14:49:56 -08:00
Valery Chernov
1cdc23aba4
[TVM EP] Rename Standalone TVM (STVM) Execution Provider to TVM EP (#10260)
* update java API for STVM EP. Issue is from PR#10019

* use_stvm -> use_tvm

* rename stvm worktree

* STVMAllocator -> TVMAllocator

* StvmExecutionProviderInfo -> TvmExecutionProviderInfo

* stvm -> tvm for cpu_targets. resolve onnxruntime::tvm and origin tvm namespaces conflict

* STVMRunner -> TVMRunner

* StvmExecutionProvider -> TvmExecutionProvider

* tvm::env_vars

* StvmProviderFactory -> TvmProviderFactory

* rename factory funcs

* StvmCPUDataTransfer -> TvmCPUDataTransfer

* small clean

* STVMFuncState -> TVMFuncState

* USE_TVM -> NUPHAR_USE_TVM

* USE_STVM -> USE_TVM

* python API: providers.stvm -> providers.tvm. clean TVM_EP.md

* clean build scripts #1

* clean build scripts, java frontend and others #2

* once more clean #3

* fix build of nuphar tvm test

* final transfer stvm namespace to onnxruntime::tvm

* rename stvm->tvm

* NUPHAR_USE_TVM -> USE_NUPHAR_TVM

* small fixes for correct CI tests

* clean after rebase. Last renaming stvm to tvm, separate TVM and Nuphar in cmake and build files

* update CUDA support for TVM EP

* roll back CudaNN home check

* ERROR for not positive input shape dimension instead of WARNING

* update documentation for CUDA

* small corrections after review

* update GPU description

* update GPU description

* misprints were fixed

* cleaned up error msgs

Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
Co-authored-by: KJlaccHoeUM9l <wotpricol@mail.ru>
Co-authored-by: Thierry Moreau <tmoreau@octoml.ai>
2022-02-15 10:21:02 +01:00
Dmitri Smirnov
91b8ad5ee7
Allow users to bind arbitrary memory using raw pointers (#10428)
Add binding external allocation
  Add negative tests
  Add missing return status check
2022-02-01 18:09:24 -08:00
Scott McKay
c1c9fa18bf
C#: Avoid inefficient DenseTensor ctor in ToTensor extensions (#10240)
* Update extension helpers to avoid inefficient construction of DenseTensor.
Add tests for extension helpers.
2022-01-19 07:43:44 +10:00
CarlPoirier
4af232df0c
Fix props file overwriting AdditionalIncludeDirectories (#10124)
Co-authored-by: Carl Poirier <carl.poirier@vab-solutions.com>
2022-01-11 23:30:40 -08:00
Hariharan Seshadri
0552a47ec2
Enable CUDA provider option configuration for C# (#10188) 2022-01-06 11:03:14 -08:00
Sheil Kumar
ce1a9ca618
Fix Microsoft.AI.MachineLearning NuGet App failure with multiple binaries copied to same destination (#10076)
* Include onnxruntime binary when not using pacakge referene or uap app.

* Remove the lib\uap10.0 build from the nuget package - causing conflicts

* Add UWP test

* remove build files

* remove local change

* reset mimalloc and onnx-tensorrt

* change username to Microsoft

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-12-21 12:34:03 -08:00
Valery Chernov
b327e89efa
Standalone TVM Executor Provider (#10019)
* squashed commit for standalone tvm execution provider

* critical fix for correct python build with stvm ep

* get tuning log file from ep options. It has priority over AUTOTVM_TUNING_LOG

* updates and fixes

* update parsing of stvm provider options

* add support of external data for onnx model

* add conditional dump of subgraphs

* remove unused code

* get input tensor shapes through provider options. get output shapes for fixed input ones by TVM API

* support AUTO_TVM tuning log file inside ORT. Selector for Ansor and Auto_TVM is provider option (tuning_type)

* add fp16

* add functionality of conversion of model layout to NHWC if need. Necessary parameter was added to STVM provider options

* fix license text in header. fix log format

* small fixes

* fix issues from flake8

* remove model proto construction from GetCapability

* reserve memory for vector of DLTensors

* add simple tutorial for STVM EP

* STVM docs

* jroesch/tvm -> apache/tvm

* remove dead code, unneccessary logs and comments

* fix in readme

* improve tutorial notebook

* tvm update

* update STVM_EP.md

* fix default value

* update STVM_EP.md

* some TODOs for the future development

* shorten long lines

* add hyperlink to STVM_EP.md

* fix Linux CI error

* fix error in csharp test

Co-authored-by: Jared Roesch <jroesch@octoml.ai>
Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
Co-authored-by: KJlaccHoeUM9l <wotpricol@mail.ru>
2021-12-15 16:59:20 -08:00
Scott McKay
3f5c1e1c58
Update to include the Xamarin targets for internal ORT builds so the managed nuget package is consistent as both CPU and GPU builds produce a package called Microsoft.ML.OnnxRuntime.Managed. (#9906) 2021-12-02 18:43:34 +10:00
Scott McKay
fb4a8e12fc
Limit inclusion of Xamarin mobile target frameworks. (#9834)
- Only set them as targets for the ORT nuget package
    - Use OrtPackageId as the condition for inclusion, if installed
      - need to do the nuget restore via msbuild so that this property is set correctly
  - Add desktop-only version of the C# sln as there is no way to exclude the mobile specific csproj's from an sln
    - use this when applicable if someone is running build.py with the `--build_nuget` flag

Other
  - remove attempt to include symbols in the nuget package as nuget doesn't support symbols in native packages
  - update build.py to use `nuget` and not a windows specific path and filename for a linux build with `--build_nuget`
2021-11-23 11:29:53 +10:00
Dmitri Smirnov
567749b2dc
Expose IOBinding SynchronizeInputs/Outputs via C/C++/C# And Python APIs (#9823)
Add C/C++ APIs for SynchronizeBoundInputs/Outputs
 Add python bindings
 Expose SynchronizeBoundInputs/Outputs to C# API
2021-11-22 09:45:31 -08:00
Sheil Kumar
71a1a7b471
Enable building winml with --build_nuget (#9632)
* Enable building winml with --build_nuget

* Fix flake8 errors

* semicolor

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-11-04 00:42:51 -07:00
Scott McKay
eb2612b588
Remove netcoreapp2.1 target as it is EOL and out of support. Attempting to use it with VS now causes unit test run failures. (#9603) 2021-10-29 11:11:22 +10: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
Jeff Daily
c8789d3047
[ROCm] static re-hipify of CUDA EP to ROCm EP, now a shared provider (#8877)
* re-hipify all rocm EP sources

* fix all other files affected by re-hipify

* add cuda_provider_factory.h to amd_hipify.py

* do not use cudnn_conv_algo_search in ROCm EP, missing reduce min registration

* Fix ReduceConsts template specialization introduced in #9101.

Fixes the error when building for ROCm 4.3.1:

error: too many template headers for onnxruntime::rocm::ReduceConsts<__half>::One (should be 0)

* fix flake8 error in amd_hipify.py

* speed up hipify with concurrent.futures

* flake8 fix in amd_hipify.py
2021-10-14 15:15:51 -07:00
Scott McKay
eebcc20f10
Add netstandard2.0 framework to nuget managed package. (#8960)
* Add netstandard2.0 to nuget managed package.
Re-does PR that was backed out due to packaging pipeline changes.
Allows deprecation of netstandard1.1 in the following release as netstandard2 is the preferred lowest level framework.
2021-09-04 08:01:46 +10:00
Scott McKay
b21ea00020
Cleanup C# bindings to add EP (#8810)
Fix C# add EP bindings.
Add stubs to ORT so that if EP is not included in the build we return a graceful error message.
Move declaration of stubs into C API and out for EP so they're in one place and are easier to use (no extra header required in the C/C++ world and consistent with the CUDA EP setup).
Fix inconsistency in ROCM EP.
Cleanup a few other things.
2021-08-26 13:59:40 +10:00
Chandru Ramakrishnan
f51f2bad66
Fix for doxygen doc errors. (#8814) 2021-08-23 15:52:15 -04:00
Dmitri Smirnov
aaeb781132
Revert "Add netstandard2.0 target to OnnxRuntime.Managed (#8600)" (#8648)
This reverts commit e673d2e050.
2021-08-09 10:08:07 -07:00
Georg Jung
e673d2e050
Add netstandard2.0 target to OnnxRuntime.Managed (#8600) 2021-08-05 18:39:25 +10:00
Ryan Hill
cc9f793b48
Move one function from cuda_provider_factory.h (#8407) 2021-07-19 17:55:59 -07:00
Chi Lo
91075255a7
Enable TRT provider option configuration for C# (updated version) (#7808)
* prepare for C# to configure provider options

* add c# code

* revert modification

* Add update provider info configuration in trt ep side

* fix bugs

* fix bug for compiler error C2259

* Add c# test

* fix bug

* fix bug

* Properly deal with string

* Add c# api for accepting trt provider options

* fix bug

* Modify C# test

* add shared lib test

* Add get provider options functionality

* clean up

* clean up

* fix bug

* fix bugs for CI

* Fix bugs for CI and documentation

* Move TRT EP provider options related functions out of C API

* revert

* fix bug

* refactor

* add check for provider options string

* code refactor

* fix CI bug

* Fix CI bugs

* clean up

* fix bug

* Fix bug for Post Analysis

* fix accidental bug

* Add API_IMPL_BEGIN/API_IMPL_END

* clean up

* code refactor

* code refactor

* fix CI fail

* fix bug

* use string append

* Change the code to better handle strncpy and string append
2021-06-25 03:21:22 -07:00
Hariharan Seshadri
4fd7efcf0d
Update logic in props.xml to account for shared provider library changes (#8138) 2021-06-23 20:41:44 -07:00
Hariharan Seshadri
53d1d55ea8
Add ability for pre-packed weights of shared initializers to be shared across sessions (#7421) 2021-05-14 20:44:42 -07:00
Chi Lo
a94a893d5e
Update SessionOptions.cs (#7540)
Fix compile warning
2021-05-04 01:51:35 -07:00
Sheil Kumar
94c4c44bfc
Enable Microsoft.Ai.MachineLearning package to work on .NET5 down to 17763 Windows SDK (#7522)
* upgrade cswinrt and downgrade target framework

* fix sdk version references

* cswinrt 1.1.0

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-05-01 00:56:36 -07:00
Chi Lo
0dbe51b002
Enable TRT EP for C# (#7482)
* enabled TRT EP for C#

* Fix potential leak
2021-04-29 04:56:40 -07:00
Sheil Kumar
265db2ad96
Fix Microsoft.AI.MachineLearning .NET5 publishing and C# Store Release build (#7373)
* fix .net publishing

* make experimental api build with microsoft.ai.machinelearning.idl import

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-04-19 15:36:43 -07:00
Shucai Xiao
c588d5d13a
Add rocm execution provider to prover_list (#6306)
* code changes to add rocm ep to ep_list
2021-03-12 07:51:08 -08:00
Tiago Koji Castro Shibata
fa8d1b44b8
Fix app packaging in UWP (#6804)
* Change msbuild condition for UAP

* update .netcore target as well

* create nuget packages with _native path

* validate path under _native directory for windowsai package

* pep8

* add diagnostic error message

* pep8

* use baseame

* lib\uap10.0

* uap10

* build\\uap10.0

* Manually binplace winmds into appx when PackageReference is used.

* always binplace winmd regardless of packagereference since c# should work with packages.config also

* resolve all paths to full paths to avoid some reference warnings

* move winmds out of lib folder to prevent automatic component registration

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-03-04 11:16:25 -08:00
Sheil Kumar
87cb6fd495
Add LearningModelBuilder to WinML Experimental Namespace along with various Audio operators (#6623)
* model building

* fix build

* winml adapter model building api

* model building

* make build

* make build again

* add model building with audio op

* inplace and inorder fft

* add ifft

* works!

* cleanup

* add comments

* switch to iterative rather than recursive and use parallelization

* batched parallelization

* fft->dft

* cleanup

* window functions

* add melweightmatrix op

* updates to make spectrogram test work

* push latest

* add onesided

* cleanup

* Clean up building apis and fix mel

* cleanup

* cleanup

* naive stft

* fix test output

* middle c complete

* 3 tones

* cleanup

* signal def new line

* Add save functionality

* Perf improvements, 10x improvement

* cleanup

* use bitreverse lookup table for performance

* implement constant initializers for tensors

* small changes

* add matmul tests

* merge issues

* support add attribute

* add tests for double data type windowfunctions and minor cleanup

* stft onesided/and not tests

* cleanup

* cleanup

* clean up

* cleanup

* remove threading attribute

* forward declare orttypeinfo

* warnings

* fwd declare

* fix warnings

* 1 more warning

* remove saving to e drive...

* cleanup and fix stft test

* add opset picker

* small additions

* add onnxruntime tests

* add signed/unsigned

* fix warning

* fix warning

* finish onnxruntime tests

* make windows namespace build succeed

* add experimental flag

* add experimental api into nuget package

* add experimental api build flag and add to windows ai nuget package

* turn experimental for tests

* add minimum opset version to new experimental domain

* api cleanup

* disable ms experimental ops test when --ms_experimental is not enabled

* add macro behind flag

* remove unused x

* pr feedback

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-02-12 14:17:10 -08:00
Changming Sun
0b89f931d0
Update CUDA build configs (#6598)
1. Fix Nuget package build break caused by #6225
2. Delete Dockerfile.centos_gpu. It is not used anywhere.
3. Fix Linux CUDA 10.2 build error caused by glibc upgrade
2021-02-08 22:55:42 -08:00
Dmitri Smirnov
dda5a62072
Fix updated Doxygen errors. (#6588) 2021-02-05 18:07:03 -08:00
Hariharan Seshadri
33f60a06d5
Dont use default string marshalling in C# (#6219) 2021-01-20 17:44:36 -08:00
Hariharan Seshadri
d42399e1b0
Allow querying a GraphProto's doc_string as part of ModelMetadata (#6248) 2021-01-05 22:18:03 -08:00
Sheil Kumar
a6a23db130
Enable C# .NET5 for WinML (#6120)
* build for .net5

* only reference cswinrt for .net5

* remove netstandard2.0 references

* upgrade language version

* net5

* remove extra comment closure

* add targetframework

* set target framework

* remove net*

* pep8 errors

* make test project build with .net windows SDK projection

* disable c# builds for non-x64 builds

* fix pep8 errors

* disable for store build

* fix tests

* remove cswinrt and sdk references from package

* bump cswinrt down to 1.0.1

* fix bin path

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-12-14 15:05:15 -08:00
Dmitri Smirnov
c2d610066a
C#: Add CreateFromMemory to FixedBufferOnnxValue to allow bind user buffers and pass custom binary compatible types (#5886)
Add CreateFromMemory to FixedBufferOnnxValue so users can bind their own custom binary compatible buffers to feed/fetch data.
2020-11-24 14:10:14 -08:00
Hariharan Seshadri
d46dbeafd3
Expose knobs to create and share (CPU) allocators across sessions in C# and Python (#5634) 2020-11-21 14:12:33 -08:00
Dmitri Smirnov
ceedf5630b
Document all C# API pubic interfaces (#5853)
Address documentation shortcomings.
 Document all required public interfaces.
 Add pipeline configuration.
Make Doxygen lookup a env vars for paths.
2020-11-20 14:03:55 -08:00
S. Manohar Karlapalem
ff58f621fa
Remove nGraph Execution Provider (#5858)
* Remove nGraph Execution Provider

Pursuant to nGraph deprecation notice: https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/nGraph-ExecutionProvider.md#deprecation-notice

**Deprecation Notice**

| | |
| --- | --- |
| Deprecation Begins	| June 1, 2020 |
| Removal Date |	December 1, 2020 |

Starting with the OpenVINO™ toolkit 2020.2 release, all of the features
previously available through nGraph have been merged into the OpenVINO™
toolkit. As a result, all the features previously available through
ONNX RT Execution Provider for nGraph have been merged with ONNX RT
Execution Provider for OpenVINO™ toolkit.

Therefore, ONNX RT Execution Provider for **nGraph** will be deprecated
starting June 1, 2020 and will be completely removed on December 1,
2020. Users are recommended to migrate to the ONNX RT Execution Provider
for OpenVINO™ toolkit as the unified solution for all AI inferencing on
Intel® hardware.

* Remove nGraph Licence info from ThirdPartyNotices.txt

* Use simple Test.Run() for tests without EP exclusions

To be consistent with rest of test code.

* Remove nGraph EP functions from Java code
2020-11-19 16:47:55 -08:00
Guoyu Wang
261462be0d
Change NNAPI runtime options to use uint32_t (#5863)
* Change nnapi options unsigned long -> uint32_t

* Move options from long to int in java code
2020-11-19 13:38:49 -08:00
Justin Stoecker
bd236ecc26
Switch to unified DirectML 1.4.0 redistributable (#5794)
Transitions from the ORT-only DML NuGet (hosted on the onnxruntime_public feed) to the new unified DirectML NuGet (Microsoft.AI.DirectML) on nuget.org. In addition, the Microsoft.AI.MachineLearning (WinML) and Microsoft.ML.OnnxRuntime.DirectML packages now take a dependency on the Microsoft.AI.DirectML package. This means we can remove the extra copy of DML binaries in these packages since they will be installed by the DML package.
2020-11-17 13:42:23 -08:00
Dmitri Smirnov
2f35e65135
Add Float16 and BFloat16 support to C# API (#5775)
Add Float16 and BFloat16 support.
2020-11-12 17:57:08 -08:00
Dmitri Smirnov
871af477d7
Fix outputs of Sequences and Maps exposure. (#5743)
Fix outputs of Sequences and Maps exposure.
  Add more test conditions.
  Make sure RunWithBingind calls the right function.
2020-11-11 10:21:22 -08:00
Tiago Koji Castro Shibata
9e68e98423
Add static CRT DLLs to Nuget package (#5661)
* Add static runtime yaml option

* Add to WAI Nuget build matrix

* Support empty build flags

* Add DML to x64

* Bundle static rt

* Bundle after Nugets are built

* Fix typo

* Skip static tests

* Pack test artifact only in x64 dynamic

* No DML static runtime

* Add Store static

* Revert "Add Store static"

This reverts commit 69133e5838.

* Static subfolder
2020-11-05 09:26:17 -08:00
Guoyu Wang
a2b551ff08
Add runtime options for NNAPI EP (#5576)
* Add options for nnapi ep

* Add nnapi flags test

* add comments

* Add flag comments

* Make the flags bitset const

* Fix build break

* Add stub changes to java and c# api

* Fix java related build break

* Fix java build break

* Switch to bit flags instead of bitset
2020-11-04 10:08:43 -08:00
Hariharan Seshadri
7a80a4b526
Support more C# APIs (#5608) 2020-10-30 19:19:50 -07:00