onnxruntime/winml/test/api/RawApiHelpers.h
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

16 lines
No EOL
544 B
C

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "microsoft.ai.machinelearning.h"
#include "microsoft.ai.machinelearning.native.h"
#include "raw/microsoft.ai.machinelearning.h"
#include "raw/microsoft.ai.machinelearning.gpu.h"
enum class InputStrategy {
CopyInputs,
BindAsReference,
BindWithMultipleReferences
};
void RunOnDevice(Microsoft::AI::MachineLearning::learning_model& model, Microsoft::AI::MachineLearning::learning_model_device& device, InputStrategy strategy);