mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-08 17:17:15 +00:00
* fix some more breaks * learning model doesn't need lotusEnvironment and CPU shouldn't include dmlEP headers * move dml checks out of winml and into the adapter * better error handling
30 lines
807 B
C++
30 lines
807 B
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#ifdef USE_DML
|
|
#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
|
|
|
|
#endif USE_DML
|