mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Fix WinML namespace build break (#3583)
* Add missing winrt namespace * Conditional compilation of dxcore code * Fix TAEF macros
This commit is contained in:
parent
56b223bc60
commit
14e387aa1a
5 changed files with 7 additions and 5 deletions
|
|
@ -63,7 +63,7 @@ D3DDeviceCache::D3DDeviceCache(winml::LearningModelDeviceKind const& deviceKind)
|
|||
}
|
||||
#ifdef ENABLE_DXCORE
|
||||
if (support.has_dxgi == false) {
|
||||
com_ptr<IDXCoreAdapter> spAdapter;
|
||||
winrt::com_ptr<IDXCoreAdapter> spAdapter;
|
||||
WINML_THROW_IF_FAILED_MSG(GetDXCoreHardwareAdapterWithPreference(preference, spAdapter.put()), errStr);
|
||||
WINML_THROW_IF_FAILED(D3D12CreateDevice(spAdapter.get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(device_.put())));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include <initguid.h>
|
||||
#include <d3d11.h>
|
||||
|
||||
#include "NamespaceAliases.h"
|
||||
|
||||
#if __has_include("dxcore.h")
|
||||
#define ENABLE_DXCORE 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static void LearningModelSessionAPITestsGpuMethodSetup() {
|
|||
|
||||
static void LearningModelSessionAPITestsGpuSkipEdgeCoreMethodSetup() {
|
||||
LearningModelSessionAPITestsGpuMethodSetup();
|
||||
SKIP_EDGECORE
|
||||
SKIP_EDGECORE;
|
||||
}
|
||||
|
||||
static void CreateSessionDeviceDefault()
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ using namespace WEX::TestExecution;
|
|||
TEST_CLASS(test_class_name);
|
||||
|
||||
#define WINML_TEST_CLASS_SETUP_CLASS(setup_class) \
|
||||
TEST_CLASS_SETUP(TestMethodSetup) { \
|
||||
TEST_CLASS_SETUP(TestClassSetup) { \
|
||||
getapi().setup_class(); \
|
||||
return true; \
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ static void ScenarioCppWinrtTestsGpuMethodSetup() {
|
|||
};
|
||||
|
||||
static void ScenarioCppWinrtTestsSkipEdgeCoreMethodSetup() {
|
||||
SKIP_EDGECORE
|
||||
SKIP_EDGECORE;
|
||||
};
|
||||
|
||||
static void ScenarioCppWinrtTestsGpuSkipEdgeCoreMethodSetup() {
|
||||
ScenarioCppWinrtTestsGpuMethodSetup();
|
||||
SKIP_EDGECORE
|
||||
SKIP_EDGECORE;
|
||||
};
|
||||
|
||||
static void Sample1() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue