onnxruntime/winml/lib/Api.Core/DmlOrtSessionBuilder.h
Paul McDaniel b4047a0aad fixed some lifetime management.
fixed the debug build.
squeezenet passes using winmlrunner for CPU and GPU
2019-11-18 09:50:25 -08:00

34 lines
No EOL
1,006 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include "inc/WinMLAdapter.h"
namespace Windows::AI::MachineLearning::Adapter {
class DmlOrtSessionBuilder : public Microsoft::WRL::RuntimeClass <
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
_winmla::IOrtSessionBuilder> {
public:
DmlOrtSessionBuilder(ID3D12Device* device, ID3D12CommandQueue* queue);
HRESULT STDMETHODCALLTYPE CreateSessionOptions(
ISessionOptions** p_options) override;
HRESULT STDMETHODCALLTYPE CreateSession(
ISessionOptions* options,
_winmla::IInferenceSession** p_session,
onnxruntime::IExecutionProvider** pp_provider) override;
HRESULT STDMETHODCALLTYPE Initialize(
_winmla::IInferenceSession* p_session,
onnxruntime::IExecutionProvider* p_provider) override;
private:
winrt::com_ptr<ID3D12Device> device_;
winrt::com_ptr<ID3D12CommandQueue> queue_;
};
} // namespace Windows::AI::MachineLearning::Adapter