onnxruntime/winml/lib/Api.Ort/UniqueOrtPtr.h
Tiago Koji Castro Shibata f48b9e2ea7
Add adapter session tests (#3522)
* Start adapter tests

* Fix more adapter session CMake

* Implememt adapter session tests

* Fix adapter test breaks

* Test fixes, profiling test

* Fix adapter w/ DML tests

* Cleanup

* Fix WinML adapter profiling test

* Fix memory leaks

* Remove FIXME
2020-04-24 14:39:54 -07:00

19 lines
1.4 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <memory>
#include "adapter/winml_adapter_c_api.h"
using UniqueOrtModel = std::unique_ptr<OrtModel, decltype(WinmlAdapterApi::ReleaseModel)>;
using UniqueOrtAllocator = std::unique_ptr<OrtAllocator, decltype(WinmlAdapterApi::FreeProviderAllocator)>;
using UniqueOrtSessionOptions = std::unique_ptr<OrtSessionOptions, decltype(OrtApi::ReleaseSessionOptions)>;
using UniqueOrtSession = std::unique_ptr<OrtSession, decltype(OrtApi::ReleaseSession)>;
using UniqueOrtValue = std::unique_ptr<OrtValue, decltype(OrtApi::ReleaseValue)>;
using UniqueOrtMemoryInfo = std::unique_ptr<OrtMemoryInfo, decltype(OrtApi::ReleaseMemoryInfo)>;
using UniqueOrtTypeInfo = std::unique_ptr<OrtTypeInfo, decltype(OrtApi::ReleaseTypeInfo)>;
using UniqueOrtTensorTypeAndShapeInfo = std::unique_ptr<OrtTensorTypeAndShapeInfo, decltype(OrtApi::ReleaseTensorTypeAndShapeInfo)>;
using UniqueOrtRunOptions = std::unique_ptr<OrtRunOptions, decltype(OrtApi::ReleaseRunOptions)>;
using UniqueOrtEnv = std::unique_ptr<OrtEnv, decltype(OrtApi::ReleaseEnv)>;