Commit graph

82 commits

Author SHA1 Message Date
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
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
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
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
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
Sheil Kumar
bd5067a2ff
Cannot upgrade SDK version because winml_lib_telemetry pulls in SDK cppwinrt version (#7795)
* fix telemetry includes

* add dependencies

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-05-24 08:00:24 -07:00
Sheil Kumar
8e3cdf0452
Use unicode apis for loadlibrary (#7523)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-05-03 07:24:40 -07:00
Ori Levari
dfca1a09d5
Add Thread Spinning Session Option in WinML (#7498)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-04-30 11:44:58 -07:00
Sheil Kumar
b7c89ce78a
User/sheilk/add api usage telemetry (#7320)
* winml telemetry

* change name to ApiUsage

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-04-12 17:51:25 -07: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
Ryan Lai
c7feb48083
Don't send out Runtime error telemetry when can't create LearningModelDevice on machine without hardware adapters (#6535)
* Checkoutpoint 1

* Remove global logruntime error telemetry. This isn't necessary and doesn't contain relevant information

* Make macro simpler

Co-authored-by: Ryan Lai <ryalai96@gamil.com>
2021-02-03 14:27:29 -08:00
Ori Levari
531eb064ab
fix sdl bugs for uninitialized variables and returns (#6450)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-01-29 15:00:44 -08:00
Ori Levari
3b1227c5ce
SDL annotation fixes (#6448)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-01-28 22:34:10 -08:00
Ori Levari
21b4842c34
SDL fixes: add proper casts/format specifiers (#6446) 2021-01-28 22:33:04 -08:00
Xiang Zhang
ce46f37ff2
expose learningmodelpixelrange property (#5877) 2021-01-28 15:29:55 -08:00
Sheil Kumar
ea2b560055
Fix test breaks in Windows ingestion pipeline (#6476)
* fix various build breaks with Windows build

* fix runtime errors loading libraries from system32

* add build_inbox check to winml_test_common

* use raw string

* cleanup

* fix dll load

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-01-28 14:37:15 -08:00
Sheil Kumar
d5f51c4033
Bug 31463811: Servicing: Redist (Nuget) conflicts with Microsoft.AI.MachineLearning starting 21H1+ (#6460)
* update load library code to have the fullly qualified path

* make it work for syswow32

* git Revert "make it work for syswow32"

This reverts commit b9f594341b7cf07241b18d0c376af905edcabae3.

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2021-01-27 12:25:03 -08:00
Ori Levari
6507b4f818
Reintroduce experimental api changes and fix remote build break (#6385)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2021-01-22 15:15:53 -08:00
Ryan Lai
4db4982a5e
This added telemetry isn't needed (#6363) 2021-01-15 16:36:59 -08:00
Ryan Lai
961bb62ae4
Add create session to WinML telemetry to track WinML Usage (#6356) 2021-01-14 22:42:55 -08:00
Sheil Kumar
00f43a3a68
add missing iclosable interface (#6036)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-12-04 13:21:03 -08:00
Ryan Lai
897310f6fb
Add suspend handler with new telemetry event for UWP scenarios (#5907)
* Add suspend handler with new telemetry event

* Fix build warning

* Use cppwinrt from nuget

* Restore nuget packages

* add dependencies

* Add nuget_helpers

* Cleaned up

* Clean up

* Comment

* Add dependencies for the rest

* Remove unused line

* Update activation string

* PR comment to remove ALL
2020-12-01 20:26:18 -08:00
Sheil Kumar
84c1340f9b
Refactor implementation of Tensor<T> and underlying buffer stores to improve binary size and maintainability (#5836)
* refactor tensor buffers to make cleaner

* refactor to make tensor backing buffer implementation smaller and cleaner

* missed virtual on destructor

* remove unnecessary static_pointer_cast

* add string vector accessor

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-11-18 14:56:47 -08:00
Tiago Koji Castro Shibata
794e8479eb
Revert #5805 (#5823)
* Fix race condition in msbuild

* Revert "Named Dimension Override internals test and experimental API (#5805)"

This reverts commit 157d1844fb.
2020-11-16 17:05:28 -08:00
Sheil Kumar
671fa60327
Enable direct tensorization and detensorization to many buffers in WinML (#5791)
* switch to work PC

* back with iterable of buffers

* add raw api tests

* tensorization

* last test

* all tests pass!

* small cleanup

* whitespace

* newline

* whitespace

* refactor common code into DisjointBufferHelpers

* remove unused file

* warning

* skip gpu tests when hardware not available

* Add error condition when createreference is invoked

* add null check to cretereference

* uncomment out check

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-11-16 10:06:22 -08:00
Ori Levari
157d1844fb
Named Dimension Override internals test and experimental API (#5805) 2020-11-13 21:21:11 -08:00
Ryan Lai
f207f0bf5e
Add WinML Model testing (#5417)
* Model test start with float

* Clean up code and add environment variable detection

* Move into namespace

* PR comments

* Fix linker errors in latest merge to master and also fix warning

* add skipping model test mechanism

* Return std::string instead of writing to buffer

* Address case where env variable is larger than max_path

* use const static string for test reason

* Disable x86 tests and don't build if ort memory checker is enabled

* Add comment

* Add additional failing x86 tests and ifdef for checking fo rx86 build

* PR comments
2020-10-15 19:04:12 -07:00
Tiago Koji Castro Shibata
83ead3e2eb
Fix com ptr refcount (#5404) 2020-10-08 10:18:38 -07:00
Tiago Koji Castro Shibata
cd663d58f5
Fix WinML warnings (#5228) 2020-09-19 12:41:42 -07:00
Tiago Koji Castro Shibata
f7c3e4fa99
Store/containerized apps support (#4651)
* Initial containerized/Store build

* Remove unsupported APIs

* Remove usage of STL ifstream

* Revert CMake changes

* Link to app runtime

* WCOS/Store cmake

* Update CMakeSettings.json

* Fix winapi family support

* Fix downlevel

* Downlevel build

* Remove downlevel workaround

* pep8 compliance

* Workaround WinRT headers bug

https://github.com/microsoft/cppwinrt/issues/584 in older SDK

* Always cross compile to avoid warnings as errors

* PR feedback

* More CI fixes

* PR feedback

* aiinfra build fix

* Win8 store
2020-09-09 14:36:35 -07:00
Brian Martin
f41614a875
User/brianma/telemetry (#5084)
* add runtime session id to (de)tensorization events

* append start or stop to the event names and remove opcodes

* add appsessionguid to telemetry events
2020-09-08 19:02:46 -07:00
Xiang Zhang
0dad79b495
Add SetLanguageProjection C Api and use it in four projections (#5023)
* Add SetLanguageProjection C Api and use it in four projections

* static cast enum languageprojection to uint32_t

* resolve comments

* fix typo and line added unintentionally

* revert unecessary change

* reorder c# api

* add TensorAt and CreateAndRegisterAllocator in Csharp to keep the same order as C apis
2020-09-04 14:26:39 -07:00
Brian Martin
655ffd5d5b
make (de)tensorization events measure level events (#4958)
* make tensorizer events measures

* throttle the events and add a new one SoftwareBitmapToGPUTensorTelemetryEvent

* factor out timing code into a class

* typo

* typo

* move eventimer class into its own header file

* add throttling to detensorization and remove variable timing

* make detensorization events measures as well

* add ConvertGPUTensorToSoftwareBitmapTelemetryEvent event

* de-duplicate event names

* fix comment

* PR feedback
2020-08-28 16:49:32 -07:00
Dwayne Robinson
040c5fa3e0
Merge pull request #4925 from microsoft/user/dwayner/Iron
ORT DirectML EP for Iron release, ONNX 1.5
2020-08-28 12:28:30 -07:00
Ori Levari
a7ce5b2be1
fix comment and casing of telemetry fields for named dimension overrides (#4943)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2020-08-27 17:30:56 -07:00
Sheil Kumar
6dc85b5f14
wstring_convert std::codecvt_utf8 add ~200KB to inbox windows.ai.machinelearning.dll binary size (#4932)
* switch to UTF8FromHString

* remove extra c_str

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-08-27 10:07:10 -07:00
Xiang Zhang
170fee0987
User/xianz/fixbuild (#4906)
* support Normalized_0_1 and Normalized_1_1

* add tests for Normalized_1_1

* fix build error

* fix imagetests failure

* support denterization and add more tests

* fix build

* remove added models

* disable gpu tests for CPU pipeline

* refactor based on comments and moved two added models

* merge normalizer and Denomalizer into NominalRangeConverter

* add comments

* little change

* fix build failure for amd64
2020-08-25 15:08:55 -07:00
Xiang Zhang
824fcbfd9d
support Normalized_0_1 and Normalized_1_1 (#4800)
* support Normalized_0_1 and Normalized_1_1

* add tests for Normalized_1_1

* fix build error

* fix imagetests failure

* support denterization and add more tests

* fix build

* remove added models

* disable gpu tests for CPU pipeline

* refactor based on comments and moved two added models

* merge normalizer and Denomalizer into NominalRangeConverter

* add comments

* little change
2020-08-24 13:13:50 -07:00
Dwayne Robinson
730d95107d Merged PR 5065263: ONNX backend autopilot crash in WinML ToString running test_cast_BFLOAT16_to_FLOAT
While attempting to throw an error and format an error message about an incompatible binding, WinML dies via FAIL_FAST_IF_MSG because the helper `ToString` function itself croaks :b. Instead, it should just say the data type is undefined.

```
StartGroup: Test:#62; Graph:test_cast_BFLOAT16_to_FLOAT; Executor:WinMLOperatorExecutor_Cpu;
TAEF: A crash with exception code 0xC0000409 occurred in module "Windows.AI.MachineLearning.dll" in process "te.processhost.exe" (pid:15732).
Error: TAEF: [HRESULT 0x800706BE] A failure occurred while running a test operation: 'OnnxConformanceTestsTaef::OnnxBackend'. (A crash with exception code 0xC0000409 occurred in module "Windows.AI.MachineLearning.dll" in the process hosting the test code while invoking a test operation.)
```
2020-08-20 21:20:37 +00:00
Ori Levari
5899c1197a
add telemetry for named dimension overrides (#4794)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2020-08-16 17:09:55 -07:00
Sheil Kumar
8a66ad79a6
Add Experimental WinRT API IDL as placeholder for adding new winrt features (#4736)
* Add experimental winrt api idl with dummy type to satisfy the build

* remove experimental from the api_lib target

* make experimental api available on windows builds also

* remove /y /d

* revert some pathing changes

* remove experimental api call from tests

* revert cppwinrt cmake changes

* switch to stdapi

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-08-12 12:45:19 -07:00
Ryan Lai
f9bd52f852
Log telemetry for WinML Native API for setting intra op num usage (#4700)
Co-authored-by: Ryan Lai <ryalai96@gmail.com>
2020-08-04 09:44:23 -07:00
Ori Levari
e6ef3653a7
Add Named Dimension Override API to LearningModelSessionOptions (WinML) (#4606)
Co-authored-by: Ori Levari <orlevari@microsoft.com>
2020-08-03 16:04:21 -07:00
Ryan Lai
5ce675c3b9
Expose Onnxruntime Intra Op thread controls through WinML Native API (#4638)
* Register ILearningModelSessionOptionsNate interface

* Threading options exposed

* Add interrogator for Session options

* Add test

* Polish test

* PR comments

* Set intra op threads

* Add adapter api to grab intra op threads

* Add adapter test for getting intraop num threads

* Make ILearningModelSessionNative and update winml api test

* Make it required when building engine to set the intraop num threads

* Make test  more pretty

* Change naming of idl function

* Revert "Change naming of idl function"

This reverts commit c06916aa5bf94e3bf233ed281e508b935fc8638d.

* PR comment on naming

* Skip the test because it's influenced if it's built with openmp

Co-authored-by: Ryan Lai <ryalai96@gamil.com>
2020-07-30 17:55:26 -07:00
Sheil Kumar
0a8bfb10fa
Inbox WinML tests fail because Inbox loads binaries from system32 (#4660)
* make dml and onnxruntime system32 only when winml and onnxruntime is loaded from system32

* use __ImageBase as that will not incur the unsupport store api call into GetModuleHandleEx

* remove accidental comment

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-07-30 00:09:18 -07:00
Sheil Kumar
efa393e596
WinML should dynamically link against onnxruntime.dll and only system32 for inbox builds (#4615)
* Dynamically link onnxruntime.dll

* fixes

* add preceeding backslash to onnxruntime.dll for inbox builds

* remove /d

* loadlibrary -> loadlibraryex

* use loadlibrary system32 option

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-07-27 09:56:49 -07:00
Sheil Kumar
c361a59cff
disable gpu timeouts in winml (#4604)
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-07-24 13:44:44 -07:00