diff --git a/CMakeLists.txt b/CMakeLists.txt index 28ad4902ca..25049a81e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ add_definitions( -DCL_USE_DEPRECATED_OPENCL_2_2_APIS ) -if(WIN32 OR WDDM_LINUX) +if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -DWDDM_VERSION_NUMBER=23 -DNOMINMAX) add_definitions(-DLEGACY_D3DAPI_VERSION=20) endif() @@ -321,7 +321,7 @@ if(NOT THIRD_PARTY_DIR) endif() message(STATUS "Third party dir: ${THIRD_PARTY_DIR}") -if(WIN32 OR WDDM_LINUX) +if(WIN32) # get WDK location and version to use if(NOT WDK_DIR) if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../wdk") @@ -356,11 +356,6 @@ if(WIN32 OR WDDM_LINUX) endif() add_compile_options(-DCONST_FROM_WDK_10_0_18328_0=${CONST_FROM_WDK_10_0_18328_0}) set(WDK_INCLUDE_PATHS "") - if(WDDM_LINUX AND IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../wsl") - get_filename_component(WSL_HEADERS "../wsl" ABSOLUTE) - list(APPEND WDK_INCLUDE_PATHS ${WSL_HEADERS}) - endif() - list(APPEND WDK_INCLUDE_PATHS "${WDK_DIR}/Include/${WindowsTargetPlatformVersion}/um" "${WDK_DIR}/Include/${WindowsTargetPlatformVersion}/shared" @@ -798,17 +793,14 @@ endif() # Compiler warning flags if(NOT MSVC) - if(NOT WDDM_LINUX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wempty-body") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wignored-qualifiers") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wtype-limits") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winvalid-pch") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-literal-suffix -Wno-error -w") - endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wempty-body") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wignored-qualifiers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wtype-limits") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winvalid-pch") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas") if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") # clang only @@ -832,9 +824,8 @@ if(NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") # Added for gtest endif() endif() - if(NOT WDDM_LINUX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + if(USE_SANITIZE_UB) check_cxx_compiler_flag(-fsanitize=undefined COMPILER_SUPPORTS_UNDEFINED_BEHAVIOR_SANITIZER) if(COMPILER_SUPPORTS_UNDEFINED_BEHAVIOR_SANITIZER) diff --git a/opencl/test/unit_test/mocks/mock_wddm.h b/opencl/test/unit_test/mocks/mock_wddm.h index 198cd12d99..becbb19984 100644 --- a/opencl/test/unit_test/mocks/mock_wddm.h +++ b/opencl/test/unit_test/mocks/mock_wddm.h @@ -34,6 +34,7 @@ class WddmMock : public Wddm { using Wddm::dedicatedVideoMemory; using Wddm::device; using Wddm::deviceRegistryPath; + using Wddm::enablePreemptionRegValue; using Wddm::featureTable; using Wddm::getSystemInfo; using Wddm::gmmMemory; diff --git a/opencl/test/unit_test/os_interface/windows/sys_calls.cpp b/opencl/test/unit_test/os_interface/windows/sys_calls.cpp index c2bb1a4dfc..3b55bc1002 100644 --- a/opencl/test/unit_test/os_interface/windows/sys_calls.cpp +++ b/opencl/test/unit_test/os_interface/windows/sys_calls.cpp @@ -61,4 +61,16 @@ char *getenv(const char *variableName) { } } // namespace SysCalls +bool isShutdownInProgress() { + return false; +} + +unsigned int getPid() { + return 0xABCEDF; +} + +unsigned int readEnablePreemptionRegKey() { + return 1; +} + } // namespace NEO diff --git a/opencl/test/unit_test/os_interface/windows/wddm23_tests.cpp b/opencl/test/unit_test/os_interface/windows/wddm23_tests.cpp index ce91a3e073..940aca56ed 100644 --- a/opencl/test/unit_test/os_interface/windows/wddm23_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/wddm23_tests.cpp @@ -37,7 +37,6 @@ struct Wddm23TestsWithoutWddmInit : public ::testing::Test, GdiDllFixture { wddm->featureTable->ftrWddmHwQueues = true; wddmMockInterface = new WddmMockInterface23(*wddm); wddm->wddmInterface.reset(wddmMockInterface); - wddm->registryReader.reset(new RegistryReaderMock()); } void init() { diff --git a/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp index c94ab865b1..d8a3281cea 100644 --- a/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp @@ -559,7 +559,7 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenCreateFromSharedHandleIs memoryManager->freeGraphicsMemory(gpuAllocation); } -TEST_F(WddmMemoryManagerSimpleTest, whenAllocationCreatedFromSharedHandleIsDestroyedThenNullAllocationHandleAndZeroAllocationCountArePassedTodestroyAllocation) { +TEST_F(WddmMemoryManagerSimpleTest, whenAllocationCreatedFromSharedHandleIsDestroyedThenDestroyAllocationFromGdiIsNotInvoked) { gdi->getQueryResourceInfoArgOut().NumAllocations = 1; std::unique_ptr gmm(new Gmm(rootDeviceEnvironment->getGmmClientContext(), nullptr, 0, 0, false)); @@ -579,9 +579,10 @@ TEST_F(WddmMemoryManagerSimpleTest, whenAllocationCreatedFromSharedHandleIsDestr memoryManager->freeGraphicsMemory(allocation); EXPECT_EQ(1u, memoryManager->freeGraphicsMemoryImplCalled); + gdi->getDestroyArg().AllocationCount = 7; auto destroyArg = gdi->getDestroyArg(); - EXPECT_EQ(nullptr, destroyArg.phAllocationList); - EXPECT_EQ(0, destroyArg.AllocationCount); + EXPECT_EQ(7, destroyArg.AllocationCount); + gdi->getDestroyArg().AllocationCount = 0; } TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWhenCreateFromNTHandleIsCalledThenNonNullGraphicsAllocationIsReturned) { diff --git a/shared/source/os_interface/windows/CMakeLists.txt b/shared/source/os_interface/windows/CMakeLists.txt index bf0bfb4135..d32de6b75e 100644 --- a/shared/source/os_interface/windows/CMakeLists.txt +++ b/shared/source/os_interface/windows/CMakeLists.txt @@ -71,6 +71,7 @@ set(NEO_CORE_OS_INTERFACE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/wddm_memory_manager.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm_memory_manager.h ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/wddm_memory_manager_allocate_in_device_pool.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wddm/read_preemption_regkey.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/um_km_data_translator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wddm/um_km_data_translator.h ${CMAKE_CURRENT_SOURCE_DIR}/wddm${BRANCH_DIR_SUFFIX}/create_um_km_data_translator.cpp diff --git a/shared/source/os_interface/windows/driver_info_windows.h b/shared/source/os_interface/windows/driver_info_windows.h index a4aa5f2272..67be2247e1 100644 --- a/shared/source/os_interface/windows/driver_info_windows.h +++ b/shared/source/os_interface/windows/driver_info_windows.h @@ -8,6 +8,7 @@ #pragma once #include "shared/source/os_interface/driver_info.h" +#include "shared/source/utilities/debug_settings_reader.h" #include #include @@ -15,8 +16,6 @@ namespace NEO { -class SettingsReader; - bool isCompatibleDriverStore(std::string &&deviceRegistryPath); class DriverInfoWindows : public DriverInfo { diff --git a/shared/source/os_interface/windows/gdi_interface.h b/shared/source/os_interface/windows/gdi_interface.h index 317c487f4d..ab35e398c6 100644 --- a/shared/source/os_interface/windows/gdi_interface.h +++ b/shared/source/os_interface/windows/gdi_interface.h @@ -7,13 +7,9 @@ #pragma once #include "shared/source/os_interface/os_library.h" +#include "shared/source/os_interface/windows/d3dkmthk_wrapper.h" #include "shared/source/os_interface/windows/os_inc.h" #include "shared/source/os_interface/windows/thk_wrapper.h" -#include "shared/source/os_interface/windows/windows_wrapper.h" - -#include - -#include #include #include diff --git a/shared/source/os_interface/windows/sys_calls.cpp b/shared/source/os_interface/windows/sys_calls.cpp index 032988f231..8d8265bd2b 100644 --- a/shared/source/os_interface/windows/sys_calls.cpp +++ b/shared/source/os_interface/windows/sys_calls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,21 @@ namespace NEO { +unsigned int getPid() { + return GetCurrentProcessId(); +} + +bool isShutdownInProgress() { + auto handle = GetModuleHandleA("ntdll.dll"); + + if (!handle) { + return true; + } + + auto RtlDllShutdownInProgress = reinterpret_cast(GetProcAddress(handle, "RtlDllShutdownInProgress")); + return RtlDllShutdownInProgress(); +} + namespace SysCalls { HANDLE createEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { diff --git a/shared/source/os_interface/windows/thk_wrapper.h b/shared/source/os_interface/windows/thk_wrapper.h index 8d5792b43d..131f748a75 100644 --- a/shared/source/os_interface/windows/thk_wrapper.h +++ b/shared/source/os_interface/windows/thk_wrapper.h @@ -7,11 +7,10 @@ #pragma once #include "shared/source/helpers/options.h" +#include "shared/source/os_interface/windows/d3dkmthk_wrapper.h" #include "shared/source/os_interface/windows/windows_wrapper.h" #include "shared/source/utilities/api_intercept.h" -#include - namespace NEO { // Default template for GetID( ) for Thk function, causing compilation error !! // Returns ID for specific ThkWrapper type diff --git a/shared/source/os_interface/windows/wddm/adapter_factory_dxcore.cpp b/shared/source/os_interface/windows/wddm/adapter_factory_dxcore.cpp index 745fcfcc94..029d442356 100644 --- a/shared/source/os_interface/windows/wddm/adapter_factory_dxcore.cpp +++ b/shared/source/os_interface/windows/wddm/adapter_factory_dxcore.cpp @@ -5,6 +5,7 @@ * */ +#define INITGUID #include "shared/source/os_interface/windows/wddm/adapter_factory_dxcore.h" #include "shared/source/helpers/debug_helpers.h" diff --git a/shared/source/os_interface/windows/wddm/read_preemption_regkey.cpp b/shared/source/os_interface/windows/wddm/read_preemption_regkey.cpp new file mode 100644 index 0000000000..547930736b --- /dev/null +++ b/shared/source/os_interface/windows/wddm/read_preemption_regkey.cpp @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/os_interface/windows/debug_registry_reader.h" +#include "shared/source/os_interface/windows/wddm/wddm.h" + +namespace NEO { + +unsigned int readEnablePreemptionRegKey() { + auto registryReader = std::make_unique(false, "System\\CurrentControlSet\\Control\\GraphicsDrivers\\Scheduler"); + return static_cast(registryReader->getSetting("EnablePreemption", 1)); +} + +} // namespace NEO diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index 1199407de2..fcd25c8177 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -20,8 +20,8 @@ #include "shared/source/helpers/string.h" #include "shared/source/helpers/windows/gmm_callbacks.h" #include "shared/source/os_interface/hw_info_config.h" -#include "shared/source/os_interface/windows/debug_registry_reader.h" #include "shared/source/os_interface/windows/driver_info_windows.h" +#include "shared/source/os_interface/windows/dxcore_wrapper.h" #include "shared/source/os_interface/windows/gdi_interface.h" #include "shared/source/os_interface/windows/kmdaf_listener.h" #include "shared/source/os_interface/windows/os_context_win.h" @@ -41,12 +41,6 @@ #include "gmm_client_context.h" #include "gmm_memory.h" -// clang-format off -#include -#include -#include -// clang-format on - namespace NEO { extern Wddm::CreateDXGIFactoryFcn getCreateDxgiFactory(); extern Wddm::DXCoreCreateAdapterFactoryFcn getDXCoreCreateAdapterFactory(); @@ -69,7 +63,7 @@ Wddm::Wddm(std::unique_ptr hwDeviceIdIn, RootDeviceEnvironment & gfxPlatform.reset(new PLATFORM); memset(gtSystemInfo.get(), 0, sizeof(*gtSystemInfo)); memset(gfxPlatform.get(), 0, sizeof(*gfxPlatform)); - this->registryReader.reset(new RegistryReader(false, "System\\CurrentControlSet\\Control\\GraphicsDrivers\\Scheduler")); + this->enablePreemptionRegValue = NEO::readEnablePreemptionRegKey(); kmDafListener = std::unique_ptr(new KmDafListener); temporaryResources = std::make_unique(this); } @@ -222,7 +216,7 @@ bool Wddm::createDevice(PreemptionMode preemptionMode) { CreateDevice.hAdapter = getAdapter(); CreateDevice.Flags.LegacyMode = FALSE; if (preemptionMode >= PreemptionMode::MidBatch) { - CreateDevice.Flags.DisableGpuTimeout = readEnablePreemptionRegKey(); + CreateDevice.Flags.DisableGpuTimeout = getEnablePreemptionRegValue(); } status = getGdi()->createDevice(&CreateDevice); @@ -663,6 +657,9 @@ NTSTATUS Wddm::createAllocationsAndMapGpuVa(OsHandleStorage &osHandles) { } bool Wddm::destroyAllocations(const D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle) { + if ((0U == allocationCount) && (0U == resourceHandle)) { + return true; + } NTSTATUS status = STATUS_SUCCESS; D3DKMT_DESTROYALLOCATION2 DestroyAllocation = {0}; DEBUG_BREAK_IF(!(allocationCount <= 1 || resourceHandle == 0)); @@ -700,14 +697,14 @@ bool Wddm::openSharedHandle(D3DKMT_HANDLE handle, WddmAllocation *alloc) { std::unique_ptr allocPrivateData(new char[QueryResourceInfo.TotalPrivateDriverDataSize]); std::unique_ptr resPrivateData(new char[QueryResourceInfo.ResourcePrivateDriverDataSize]); std::unique_ptr resPrivateRuntimeData(new char[QueryResourceInfo.PrivateRuntimeDataSize]); - std::unique_ptr allocationInfo(new D3DDDI_OPENALLOCATIONINFO[QueryResourceInfo.NumAllocations]); + std::unique_ptr allocationInfo(new D3DDDI_OPENALLOCATIONINFO2[QueryResourceInfo.NumAllocations]); D3DKMT_OPENRESOURCE OpenResource = {0}; OpenResource.hDevice = device; OpenResource.hGlobalShare = handle; OpenResource.NumAllocations = QueryResourceInfo.NumAllocations; - OpenResource.pOpenAllocationInfo = allocationInfo.get(); + OpenResource.pOpenAllocationInfo2 = allocationInfo.get(); OpenResource.pTotalPrivateDriverDataBuffer = allocPrivateData.get(); OpenResource.TotalPrivateDriverDataBufferSize = QueryResourceInfo.TotalPrivateDriverDataSize; OpenResource.pResourcePrivateDriverData = resPrivateData.get(); @@ -815,7 +812,7 @@ bool Wddm::createContext(OsContextWin &osContext) { PrivateData.IsProtectedProcess = FALSE; PrivateData.IsDwm = FALSE; - PrivateData.ProcessID = GetCurrentProcessId(); + PrivateData.ProcessID = NEO::getPid(); PrivateData.GpuVAContext = TRUE; PrivateData.pHwContextId = &hwContextId; PrivateData.IsMediaUsage = false; @@ -828,7 +825,7 @@ bool Wddm::createContext(OsContextWin &osContext) { CreateContext.Flags.HwQueueSupported = wddmInterface->hwQueuesSupported(); if (osContext.getPreemptionMode() >= PreemptionMode::MidBatch) { - CreateContext.Flags.DisableGpuTimeout = readEnablePreemptionRegKey(); + CreateContext.Flags.DisableGpuTimeout = getEnablePreemptionRegValue(); } UmKmDataTempStorage internalRepresentation; @@ -903,8 +900,8 @@ void Wddm::getDeviceState() { #endif } -unsigned int Wddm::readEnablePreemptionRegKey() { - return static_cast(registryReader->getSetting("EnablePreemption", 1)); +unsigned int Wddm::getEnablePreemptionRegValue() { + return enablePreemptionRegValue; } bool Wddm::waitOnGPU(D3DKMT_HANDLE context) { @@ -1003,14 +1000,7 @@ LUID Wddm::getAdapterLuid() const { } bool Wddm::isShutdownInProgress() { - auto handle = GetModuleHandleA("ntdll.dll"); - - if (!handle) { - return true; - } - - auto RtlDllShutdownInProgress = reinterpret_cast(GetProcAddress(handle, "RtlDllShutdownInProgress")); - return RtlDllShutdownInProgress(); + return NEO::isShutdownInProgress(); } void Wddm::releaseReservedAddress(void *reservedAddress) { diff --git a/shared/source/os_interface/windows/wddm/wddm.h b/shared/source/os_interface/windows/wddm/wddm.h index 5aaa61fd16..6bc8864397 100644 --- a/shared/source/os_interface/windows/wddm/wddm.h +++ b/shared/source/os_interface/windows/wddm/wddm.h @@ -52,6 +52,10 @@ struct OsHandleStorage; enum class HeapIndex : uint32_t; +unsigned int readEnablePreemptionRegKey(); +unsigned int getPid(); +bool isShutdownInProgress(); + class Wddm : public DriverModel { public: static constexpr DriverModelType driverModelType = DriverModelType::WDDM; @@ -146,8 +150,6 @@ class Wddm : public DriverModel { return static_cast(hwContextId); } - std::unique_ptr registryReader; - uintptr_t getWddmMinAddress() const { return this->minAddress; } @@ -155,7 +157,7 @@ class Wddm : public DriverModel { return wddmInterface.get(); } - unsigned int readEnablePreemptionRegKey(); + unsigned int getEnablePreemptionRegValue(); MOCKABLE_VIRTUAL uint64_t *getPagingFenceAddress() { return pagingFenceAddress; } @@ -209,6 +211,7 @@ class Wddm : public DriverModel { bool instrumentationEnabled = false; std::string deviceRegistryPath; RootDeviceEnvironment &rootDeviceEnvironment; + unsigned int enablePreemptionRegValue = 1; unsigned long hwContextId = 0; uintptr_t maximumApplicationAddress = 0; diff --git a/shared/source/os_interface/windows/wddm/wddm_interface.cpp b/shared/source/os_interface/windows/wddm/wddm_interface.cpp index 0ab9c97c36..53dd84ccc7 100644 --- a/shared/source/os_interface/windows/wddm/wddm_interface.cpp +++ b/shared/source/os_interface/windows/wddm/wddm_interface.cpp @@ -105,7 +105,7 @@ bool WddmInterface23::createHwQueue(OsContextWin &osContext) { createHwQueue.hHwContext = osContext.getWddmContextHandle(); if (osContext.getPreemptionMode() >= PreemptionMode::MidBatch) { - createHwQueue.Flags.DisableGpuTimeout = wddm.readEnablePreemptionRegKey(); + createHwQueue.Flags.DisableGpuTimeout = wddm.getEnablePreemptionRegValue(); } auto status = wddm.getGdi()->createHwQueue(&createHwQueue); diff --git a/shared/source/os_interface/windows/windows_defs.h b/shared/source/os_interface/windows/windows_defs.h index faf5c8ecd4..0277a0efe3 100644 --- a/shared/source/os_interface/windows/windows_defs.h +++ b/shared/source/os_interface/windows/windows_defs.h @@ -7,9 +7,7 @@ #pragma once -#include "shared/source/os_interface/windows/windows_wrapper.h" - -#include +#include "shared/source/os_interface/windows/d3dkmthk_wrapper.h" #include diff --git a/shared/test/unit_test/os_interface/windows/wddm_preemption_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_preemption_tests.cpp index de30f8477e..342a19c4ef 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_preemption_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_preemption_tests.cpp @@ -36,9 +36,7 @@ class WddmPreemptionTests : public Test { executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr(wddm)); executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique(wddm); osInterface = executionEnvironment->rootDeviceEnvironments[0]->osInterface.get(); - auto regReader = new RegistryReaderMock(); - wddm->registryReader.reset(regReader); - regReader->forceRetValue = forceReturnPreemptionRegKeyValue; + wddm->enablePreemptionRegValue = forceReturnPreemptionRegKeyValue; auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfoTest); wddm->init(); hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();