Commit graph

199 commits

Author SHA1 Message Date
Numfor Tiapo
5fbfca3d58
Add Experimental API for setting model name (#10518)
* Add experimental API for editing model name

* Change EditModelName to 'SetName'

* Change API to pass c_string

* Update SetName to edit the proto

* Test that the model proto gets changed

* Remove comments

* Skip inbox tests

* Use filehelper path

Co-authored-by: Numfor Mbiziwo-Tiapo <numform@microsoft.com>
2022-02-25 14:23:49 -08:00
Dwayne Robinson
ea7f773a6e
Merge pull request #10619 from microsoft/user/dwayner/DmlDev20220221
Update DirectML EP for ORT 1.11
2022-02-23 01:09:26 -08:00
Dwayne Robinson
6db6ee5710 Merged PR 6973543: ORT DML EP Opset 13 more complete
Extend opset 13 support for:
- Split-13
- Squeeze-13
- Unsqueeze-13
- Reshape-13
- QuantizeLinear-13
- DequantizeLinear-13
- ReduceSum-13
- Resize-13

Also:
- Rename the file where all the opset versions are stored from "OperatorRegistration.h" to "OperatorVersions.h", which will make it much less confusing in the future when looking given there's another file called "OperatorRegistration.h" that corresponds to "OperatorRegistration.cpp".
- Detemplatize many of the OperatorHelper.h constructors, which duplicate multiple instantiations due to the operator helper classes not sharing a common base class, by wrapping them with an adapter. Ideally there would be a common COM base interface that both IMLOperatorKernelCreationContext and IMLOperatorShapeInferenceContext implementation objects would implement, which a wrapper in MLOperatorAuthorHelper.h could QI for.
- Fix style formatting issues in OperatorHelper.h (sorry for the noise).

```
Summary: Total=4679, Passed=4355, Failed=0, Blocked=0, Not Run=0, Skipped=324
```

Corresponding WindowsAI PR:
https://microsoft.visualstudio.com/WindowsAI/_git/WindowsAI/pullrequest/6973645

Related work items: #36672908, #36672926
2022-02-18 01:41:07 +00:00
Jingqiao Fu
2fa333443a
Add telemetry for device kind (#10431)
Add telemetry for device kind
2022-02-17 13:56:22 -08:00
Dwayne Robinson
6fd7ba5b7e Merged PR 6917440: ONNX Runtime update from GitHub master
Just RI.

Related work items: #38034064
2022-02-04 10:13:38 +00:00
Sheil Kumar
2dd5e75ba8
Incorrect output after GPU to GPU inference via VideoFrame and Gray8 models (#10425)
* If the tensor is of gray8 format, we should call the gray8 shader

* other check (which resolves to unknown in this case) is incorrectly being compared to constant and not DXGI_FORMAT

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2022-01-28 08:45:57 -08:00
Ryan Lai
c07e251cec Merged PR 6835169: RI 12/9/21 - 01/12/22
Build is green https://microsoft.visualstudio.com/WindowsAI/_build/results?buildId=43713985&view=results

![image.png](https://microsoft.visualstudio.com/274e76ac-6b29-4f77-a85d-7914c77cabd5/_apis/git/repositories/853d2ddc-663c-4fe8-8036-dbf0d50db2d9/pullRequests/6835169/attachments/image.png)

Related work items: #37712737
2022-01-13 00:25:51 +00:00
Jingqiao Fu
5cd57bb726
add load from buffer (#10162)
* Add LoadFromBuffer API
2022-01-10 10:51:48 -08:00
Dwayne Robinson
0f5e82c294
DirectML EP remove stale code for int64 via int32 double strides (#9959) 2022-01-10 02:07:22 -08:00
Dwayne Robinson
4ff78aae45
Merge pull request #9917 from microsoft/user/dwayner/FnsCandyTolerance30696168
Update WinML model tests for FNS candy and Inception float16
2021-12-02 22:45:45 -08:00
Sheil Kumar
5edaa75ef6
Fix LoadFromStream to not use wss::Buffer internally (#9918)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-12-02 21:29:06 -08:00
Dwayne Robinson
6e4c534ce2 Relax tolerance slightly more for Intel after autopilot run 2021-12-02 19:42:31 -08:00
Dwayne Robinson
77e67a6de7 Add one more example line 2021-12-02 13:34:01 -08:00
Dwayne Robinson
ef7671b938 Comment out old lines 2021-12-02 13:30:34 -08:00
Dwayne Robinson
7a3abd863f Update WinML model test tolerances for tiny_yolov2 and FNS_Candy 2021-12-02 00:48:54 -08:00
Ryan Lai
d8a7e1d159 Merged PR 6718335: RI 11/30 from github
Pipeline green https://microsoft.visualstudio.com/WindowsAI/_build/results?buildId=42142807&view=results

![image.png](https://microsoft.visualstudio.com/274e76ac-6b29-4f77-a85d-7914c77cabd5/_apis/git/repositories/853d2ddc-663c-4fe8-8036-dbf0d50db2d9/pullRequests/6718335/attachments/image.png)

Related work items: #37220320
2021-11-30 21:29:25 +00:00
Sheil Kumar
53c43e9949
WinML RT API: Add PixelRange Metadata to Bind() call PropertySet (#9827)
* Enable Normalization Binding Metadata

* copy paste error

* Small fix.

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-11-24 13:44:25 -08:00
nums11
533b20c6ca Merge remote-tracking branch 'upstream/master' into dmldev_temp 2021-11-18 14:21:34 -08:00
Sheil Kumar
9fb3fac5a0
Enable LearningModel::LoadFromFilePath in UWP Apps (#9790)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-11-17 19:09:31 -08:00
Brian Martin
20ec48129b
fix typo in LearningModelDevice.cpp (#9787)
Ivalid -> Invalid
2021-11-17 15:29:34 -08:00
Sheil Kumar
3d0bd2596f
Enable creating OrtValues from ID3D12Resources from the onnxruntime C-API (#9686)
* Add onnxruntime-windows api.

* minor fixes

* add to package headers

* Build ort_dml_api for provider extensions.

* Cleanup

* misc comment

* remove winml specific comments

* use dml check in onnxruntime

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/session/onnxruntime_c_api.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update onnxruntime/core/session/onnxruntime_c_api.cc

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update onnxruntime/core/session/ort_apis.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update winml/test/adapter/AdapterSessionTest.cpp

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update onnxruntime/core/session/onnxruntime_c_api.cc

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update winml/adapter/winml_adapter_c_api.cpp

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/session/onnxruntime_c_api.h

Co-authored-by: Pranav Sharma <prs@microsoft.com>

* Update onnxruntime/core/session/onnxruntime_c_api.cc

Co-authored-by: Pranav Sharma <prs@microsoft.com>

* Update winml/adapter/winml_adapter_c_api.cpp

* PR feedback

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* Update include/onnxruntime/core/providers/dml/dml_provider_factory.h

Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>

* PR feedback

* merge resolution and unreference param

* (naming) Remove Dml prefix

* maybe unused version

* move DML code into DML path. CIs failing because DML is not available when --use_dml is not on

* fix warning causing local build failures after merging

* Change getvaluememoryinfo to gettensormemoryinfo

* minor breaks

* fix comment paste

* fix comment

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>
Co-authored-by: Pranav Sharma <prs@microsoft.com>
2021-11-13 03:34:54 -08:00
Sheil Kumar
a17bdaf725
Enable JoinModels API in WinML+RT Experimental API (#9746)
* Dynamic onnx model fusion

* empty node names shoudl remain empty

* comments and cleanup

* logic reversed for promoting_unlined_outputs

* PR feedback

* type

* typo

* fix model outputs with promote unlinked output

* remove disembodied model

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-11-12 16:56:31 -08:00
Jeff Bloomfield
b9c4b2e000 Merge remote-tracking branch 'upstream/master' into user/jeffbloo/MergeOrtGithub20211101 2021-11-11 16:23:50 -08:00
Ginés Hidalgo
13e64f8ff7
Remove all warnings C4800: Implicit conversion from 'int32_t/int64_t' to bool. Possible information loss (#9535) 2021-11-08 10:12:27 -08:00
Jeff Bloomfield
3a1b4045c9 Merge remote-tracking branch 'upstream/master' into DmlDev 2021-11-02 17:56:53 -07:00
sumitsays
88f61a1b2d
[DmlEp] DmlEp acknowledges ORT_NO_EXCEPTIONS (#9622)
* Make DmlEp Clang compatible for EPIC
* Fix build issues occurred when engine/lotus points to ORT Github latest
* Fix more build errors
* Fixed one build issue and removed temporary changes for Clang
* Addressed comments on the PR.
* [WIP] - DmlEp ORT NO Exception
* Made DmlEp compatible with ORT_NO_EXCEPTION
* Fixed typo
* Addressed comments on the PR, mostly nit styling and using approriate HR error code
* Added dependency of ErrorHandling.h
* Addressed comment on the PR
Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-11-01 17:32:43 -07:00
Brian Martin
6c236fd939 Merged PR 6622174: merge latest onnxruntime into dmldev
there was a merge conflict in onnxruntime/core/providers/dml/OperatorAuthorHelper/Common.h that required manual merging.

Related work items: #36867798
2021-10-30 19:59:33 +00:00
Ginés Hidalgo
79436a2d5b
Avoided warning C5038 (#9543)
Updated several DML EP files to avoid warning C5038: data member 'member1' will be initialized after data member 'member2' / base class 'base_class'

More information:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=msvc-160
2021-10-30 00:36:22 -07:00
Ryan Lai
7dad90b200 Merge remote-tracking branch 'upstream/master' into HEAD 2021-10-26 10:38:41 -07:00
Edward Chen
79e736ed25
Make onnxruntime::Status nodiscard (#9279)
Mark onnxruntime::Status class with [[nodiscard]] attribute.
Fix existing warnings.
2021-10-08 17:10:31 -07:00
Tiago Koji Castro Shibata
20b9390d1d Merged PR 6524907: Fix merge conflicts from public ORT to WindowsAI ORT 2021-10-01 22:47:52 +00:00
Sheil Kumar
c6cb49c5a1
DirectML.dll load fails when executable path contains Non-English characters (#9229)
* enable unicode dml

* add wide string L prefix

* Add Fail Fast back

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-09-30 15:16:57 -07:00
Sheil Kumar
775f862067
Add new option to disable cpu sync for tensors (#8490)
* add options to disable cpu copy back

* null check proprties

* only affect gpu outputs

* change name to disabletensorcpusync

* slight refactoring

* Globally enable ms-experimental ops

* change meaning of ms_experimental to mean *all* ms_experimental ops. Some experimental ops will still be enabled globally without this flag like audio ops.

* remove changes incorrectly merged

* bad merge

* add test

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-08-27 13:29:52 -07:00
Tiago Koji Castro Shibata
62c0d24340
Fix Windows Store build (#8753)
* Remove APIs unavailable in Store in #8349, #8178, #8065

* Add UWP stubs of C runtime functions

* Remove UWP incompatible tests from UWP build

* Remove incompatible tests from Store

* Use UWP stubs in store only

* Skip partition check outside of Windows

* Remove unused WRL include

* Workaround Windows header not including what it uses

* Fix precompiled header name clash

* Workaround SDK bugs

* DXCore workaround in Win7

* Fix warning

* Fix more warnings

* Bump WinML to target Windows 8

* Fix more warnings

* Remove unnecessary workarounds

* Remove Desktop only APIs from DML adapter
2021-08-23 11:19:03 -07:00
Changming Sun
436ac6dd5f
Rename ml_value.h to ort_value.h (#8726) 2021-08-13 07:04:56 -07:00
Adrian Tsai
caacf249c5
Disable candy_opset9 WinML model test on Qualcomm Adreno (#8647)
Bug #31652854 also repros on Qualcomm Adreno (down to the exact same pixel). This change disables this model test for Qualcomm, in addition to the existing disablement for Intel.
2021-08-11 17:57:12 -07:00
ytaous
0725f80d2d
Revert "Fix Windows Store build (#8481)" (#8679)
This reverts commit 53e7831b53.
2021-08-11 00:37:36 -07:00
Tiago Koji Castro Shibata
53e7831b53
Fix Windows Store build (#8481)
* Remove APIs unavailable in Store in #8349, #8178, #8065

* Add UWP stubs of C runtime functions

* Remove UWP incompatible tests from UWP build

* Remove incompatible tests from Store

* Use UWP stubs in store only

* Skip partition check outside of Windows

* Remove unused WRL include

* Workaround Windows header not including what it uses

* Fix precompiled header name clash

* Workaround SDK bugs

* DXCore workaround in Win7

* Fix warning

* Fix more warnings

* Bump WinML to target Windows 8

* Fix more warnings

* Remove unnecessary workarounds
2021-08-10 15:19:30 -07:00
Ryan Lai
d78568a9ac Merge remote-tracking branch 'upstream/master' into HEAD 2021-07-29 13:24:11 -07:00
Xiang Zhang
778680202b remove unused functions to avoid warnings 2021-07-28 18:03:00 -07:00
Xiang Zhang
73660d78df
Fix WinML build warnings in HStringFromUTF8 (#8519) 2021-07-27 22:29:58 -07:00
Ryan Lai
b0c0b087a4 FIx merge conflict 2021-07-21 14:02:18 -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
Sheil Kumar
eec8e1394a
Memory map files on windows to speed up model load (#8349)
* Memory map files on windows to speed up model load

* fix custom ops

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-07-12 11:52:08 -07:00
Ryan Lai
839f69d249
Implement WINRT_IMPL_LoadLibraryW to avoid calling LoadLibraryW directly (#8065)
* Override load library w in cppwinrt

* Add comment
2021-06-22 14:31:20 -07:00
Ryan Lai
de1b1edcad Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-15 09:39:26 -07:00
sumitsays
43c45ddd66
Update DirectML EP changes from DmlDev as of 2021-06-07 (#7987)
* Merged PR 6093117: Fix test_DynamicQuantizedLinear_max_adjusted_expanded by allowing Identity operator to run on non-float inputs

Motivation:
As part of the OnnxConformance Backend tests, DynamicQuantizedLinear_max_adjusted_expanded is failing.

Root Cause:
- The test model has `Identity` operator as one of the node. The input of this node is of non-float data type.
- In DML, `Identity` operator is registered as operator which requires floating input.
- As per `DirectMLSchema.h`, support for non-float input has been added for `Identity` operator in DML but the same has not been reflected in the `OperatorRegistration.cpp`.

Changes:
- Removed all traces of the requiresFloatFormatsForGraph flag from it's definition and usage. This flag was only used for Identity and it's related operator.
- Added null check for the graphOutput nodeArg in GraphDescBuilder.cpp to stop the crash of the test.

Related work items: #33076298

* Merged PR 6103324: Remove usage of non-generic error code (FWP_E_NULL_POINTER)

Motivation:
Addressing Dwayne comment on the previous PR. [Ref: [6093117](https://dev.azure.com/microsoft/WindowsAI/_git/onnxruntime/pullrequest/6093117?discussionId=44292162&path=%2Fonnxruntime%2Fcore%2Fproviders%2Fdml%2FDmlExecutionProvider%2Fsrc%2FGraphPartitioner.cpp)]

Changes:
Inside the DML EP, we should not use some other platform specific error codes. Instead we should a appropriate generic error code.

Related work items: #33076298

Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
2021-06-11 11:09:48 -07:00
Dwayne Robinson
8b0c2e1f3d Merged PR 6101363: Int64 prototype work for ONNX runtime DML EP
Add `support64BitTensorsViaEmulation` to the internal registration info, that informs the graph partitioner that int64 is supported via emulation, even if the device doesn't support it natively.

See further description in the corresponding WindowsAI DML PR:
https://dev.azure.com/microsoft/WindowsAI/_git/WindowsAI/pullrequest/6101182

Note a later PR will most likely *delete* this newly added flag and simplify much of the existing logic, even deleting the strides hack completely ^__^...

Related work items: #28761231
2021-06-11 07:54:30 +00:00
Tiago Koji Castro Shibata
fc331cbd5d
Accept success codes other than S_OK in RoInitialize (#7979)
* Accept success codes other than S_OK in RoInitialize

* Use multithreaded apartment in raw WinML tests
2021-06-07 18:06:31 -07:00
Ryan Lai
64f1a4ed22 Merge remote-tracking branch 'upstream/master' into HEAD 2021-06-04 15:58:15 -07:00