onnxruntime/winml/lib/Api.Core/DmlOrtSessionBuilder.h
Paul McDaniel 5350abe19d
LearningModelSession is cleaned up to use the adapter, and parts of b… (#2382)
this is a big PR.    we are going to move it up to layer_dev , which is still a L3 so we are still safe to do work there agile.

we are going to move this into the L3 so that ryan can start doing intergration testing.   

we will pause for a full code review and integration test result prior to going into the L2.

>>>> raw comments from previous commits >>> 

* LearningModelSession is cleaned up to use the adapter, and parts of binding are.
* moved everything in the winmladapter
made it all nano-com using, WRL to construct objects in the ORT side.
base interfaces for everythign for winml to call
cleaned up a bunch of winml to use the base interfaces.
* more pieces
* GetData across the abi.
* renamed some namepsace
cleaned up OrtValue
cleaned up Tensor
cleaned up custom ops.
everything *but* learnignmodel should be clean
* make sure it's building.   winml.dll is still a monolith.
2019-11-14 17:44:07 -08:00

34 lines
No EOL
1 KiB
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(
onnxruntime::SessionOptions* p_options) override;
HRESULT STDMETHODCALLTYPE CreateSession(
const onnxruntime::SessionOptions& 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