onnxruntime/winml/lib/Api.Core/inc/CustomRegistryHelper.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

27 lines
No EOL
775 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include "core/providers/dml/DmlExecutionProvider/src/AbiCustomRegistry.h"
namespace Windows::AI::MachineLearning::Adapter {
inline std::list<std::shared_ptr<onnxruntime::CustomRegistry>>
GetLotusCustomRegistries(
IMLOperatorRegistry* registry) {
if (registry != nullptr) {
// Down-cast to the concrete type.
// The only supported input is the AbiCustomRegistry type.
// Other implementations of IMLOperatorRegistry are forbidden.
auto abi_custom_registry =
static_cast<AbiCustomRegistry*>(registry);
// Get the ORT registry
return abi_custom_registry->GetRegistries();
}
return {};
}
} // namespace Windows::AI::MachineLearning::Adapter