onnxruntime/winml/test/adapter/AdapterSessionTest.h
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

46 lines
1.8 KiB
C

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "test.h"
struct AdapterSessionTestAPI
{
SetupClass AdapterSessionTestSetup;
TeardownClass AdapterSessionTestTeardown;
VoidTest AppendExecutionProvider_CPU;
VoidTest AppendExecutionProvider_DML;
VoidTest CreateWithoutModel;
VoidTest GetExecutionProvider;
VoidTest GetExecutionProvider_DML;
VoidTest Initialize;
VoidTest RegisterGraphTransformers;
VoidTest RegisterGraphTransformers_DML;
VoidTest RegisterCustomRegistry;
VoidTest RegisterCustomRegistry_DML;
VoidTest LoadAndPurloinModel;
VoidTest Profiling;
VoidTest CopyInputAcrossDevices;
VoidTest CopyInputAcrossDevices_DML;
VoidTest GetNumberOfIntraOpThreads;
};
const AdapterSessionTestAPI& getapi();
WINML_TEST_CLASS_BEGIN(AdapterSessionTest)
WINML_TEST_CLASS_SETUP_CLASS(AdapterSessionTestSetup)
WINML_TEST_CLASS_TEARDOWN_CLASS(AdapterSessionTestTeardown)
WINML_TEST_CLASS_BEGIN_TESTS
WINML_TEST(AdapterSessionTest, AppendExecutionProvider_CPU)
WINML_TEST(AdapterSessionTest, AppendExecutionProvider_DML)
WINML_TEST(AdapterSessionTest, CreateWithoutModel)
WINML_TEST(AdapterSessionTest, GetExecutionProvider)
WINML_TEST(AdapterSessionTest, GetExecutionProvider_DML)
WINML_TEST(AdapterSessionTest, Initialize)
WINML_TEST(AdapterSessionTest, RegisterGraphTransformers)
WINML_TEST(AdapterSessionTest, RegisterGraphTransformers_DML)
WINML_TEST(AdapterSessionTest, RegisterCustomRegistry)
WINML_TEST(AdapterSessionTest, RegisterCustomRegistry_DML)
WINML_TEST(AdapterSessionTest, LoadAndPurloinModel)
WINML_TEST(AdapterSessionTest, Profiling)
WINML_TEST(AdapterSessionTest, CopyInputAcrossDevices)
WINML_TEST(AdapterSessionTest, CopyInputAcrossDevices_DML)
WINML_TEST(AdapterSessionTest, GetNumberOfIntraOpThreads)
WINML_TEST_CLASS_END()